Class KmzFormat
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.formats.ImageFormat
-
- uk.ac.rdg.resc.edal.graphics.formats.KmzFormat
-
public class KmzFormat extends ImageFormat
Creates KMZ files for importing into Google Earth. Only one instance of this class will ever be created, so this class contains no member variables to ensure thread safety. TODO Would this be better handled by a velocity template?- Author:
- Jon Blower
-
-
Constructor Summary
Constructors Constructor Description KmzFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMimeType()
Returns the MIME type that is supported by this ImageFormat object.boolean
requiresLegend()
Returns true if this image format needs an accompanying legend.boolean
supportsFullyTransparentPixels()
Returns true if this image format supports fully-transparent pixels.boolean
supportsMultipleFrames()
Returns true if this image format supports multi-frame animations.boolean
supportsPartiallyTransparentPixels()
Returns true if this image format supports partially-transparent pixels.void
writeImage(List<BufferedImage> frames, OutputStream out, String name, String description, org.opengis.metadata.extent.GeographicBoundingBox bbox, List<org.joda.time.DateTime> tValues, String zValue, BufferedImage legend, Integer frameRate)
Writes the given list of frames to the supplied output stream.-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.formats.ImageFormat
get, getSupportedMimeTypes
-
-
-
-
Method Detail
-
writeImage
public void writeImage(List<BufferedImage> frames, OutputStream out, String name, String description, org.opengis.metadata.extent.GeographicBoundingBox bbox, List<org.joda.time.DateTime> tValues, String zValue, BufferedImage legend, Integer frameRate) throws IOException
Description copied from class:ImageFormat
Writes the given list of frames to the supplied output stream. If there are multiple frames, the image format must support animations, otherwise an exception is thrown.- Specified by:
writeImage
in classImageFormat
- Parameters:
frames
- AList
ofBufferedImage
s to plotout
- TheOutputStream
to write the resulting image toname
- The name of the feature being plotted (for KML)description
- A description of what's being plotted (for KML)bbox
- The bounding box of the data being plottedtValues
- The time values corresponding to the frames of datazValue
- A string representing the elevation of the plotted datalegend
- An image representing the legendframeRate
- The frame rate to render an animation at- Throws:
IOException
- If there is a problem writing the data to theOutputStream
-
getMimeType
public String getMimeType()
Description copied from class:ImageFormat
Returns the MIME type that is supported by this ImageFormat object.- Specified by:
getMimeType
in classImageFormat
-
supportsMultipleFrames
public boolean supportsMultipleFrames()
Description copied from class:ImageFormat
Returns true if this image format supports multi-frame animations.- Specified by:
supportsMultipleFrames
in classImageFormat
-
supportsFullyTransparentPixels
public boolean supportsFullyTransparentPixels()
Description copied from class:ImageFormat
Returns true if this image format supports fully-transparent pixels.- Specified by:
supportsFullyTransparentPixels
in classImageFormat
-
supportsPartiallyTransparentPixels
public boolean supportsPartiallyTransparentPixels()
Description copied from class:ImageFormat
Returns true if this image format supports partially-transparent pixels. If this is true then supportsFullyTransparentPixels() should also be true.- Specified by:
supportsPartiallyTransparentPixels
in classImageFormat
-
requiresLegend
public boolean requiresLegend()
Description copied from class:ImageFormat
Returns true if this image format needs an accompanying legend. This default implementation returns false, but subclasses can override.- Specified by:
requiresLegend
in classImageFormat
- See Also:
KmzFormat
-
-