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 StringgetMimeType()Returns the MIME type that is supported by this ImageFormat object.booleanrequiresLegend()Returns true if this image format needs an accompanying legend.booleansupportsFullyTransparentPixels()Returns true if this image format supports fully-transparent pixels.booleansupportsMultipleFrames()Returns true if this image format supports multi-frame animations.booleansupportsPartiallyTransparentPixels()Returns true if this image format supports partially-transparent pixels.voidwriteImage(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:ImageFormatWrites 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:
writeImagein classImageFormat- Parameters:
frames- AListofBufferedImages to plotout- TheOutputStreamto 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:ImageFormatReturns the MIME type that is supported by this ImageFormat object.- Specified by:
getMimeTypein classImageFormat
-
supportsMultipleFrames
public boolean supportsMultipleFrames()
Description copied from class:ImageFormatReturns true if this image format supports multi-frame animations.- Specified by:
supportsMultipleFramesin classImageFormat
-
supportsFullyTransparentPixels
public boolean supportsFullyTransparentPixels()
Description copied from class:ImageFormatReturns true if this image format supports fully-transparent pixels.- Specified by:
supportsFullyTransparentPixelsin classImageFormat
-
supportsPartiallyTransparentPixels
public boolean supportsPartiallyTransparentPixels()
Description copied from class:ImageFormatReturns true if this image format supports partially-transparent pixels. If this is true then supportsFullyTransparentPixels() should also be true.- Specified by:
supportsPartiallyTransparentPixelsin classImageFormat
-
requiresLegend
public boolean requiresLegend()
Description copied from class:ImageFormatReturns true if this image format needs an accompanying legend. This default implementation returns false, but subclasses can override.- Specified by:
requiresLegendin classImageFormat- See Also:
KmzFormat
-
-