Class 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 Detail

      • KmzFormat

        public KmzFormat()
    • 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 class ImageFormat
        Parameters:
        frames - A List of BufferedImages to plot
        out - The OutputStream to write the resulting image to
        name - 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 plotted
        tValues - The time values corresponding to the frames of data
        zValue - A string representing the elevation of the plotted data
        legend - An image representing the legend
        frameRate - The frame rate to render an animation at
        Throws:
        IOException - If there is a problem writing the data to the OutputStream
      • getMimeType

        public String getMimeType()
        Description copied from class: ImageFormat
        Returns the MIME type that is supported by this ImageFormat object.
        Specified by:
        getMimeType in class ImageFormat
      • supportsMultipleFrames

        public boolean supportsMultipleFrames()
        Description copied from class: ImageFormat
        Returns true if this image format supports multi-frame animations.
        Specified by:
        supportsMultipleFrames in class ImageFormat
      • supportsFullyTransparentPixels

        public boolean supportsFullyTransparentPixels()
        Description copied from class: ImageFormat
        Returns true if this image format supports fully-transparent pixels.
        Specified by:
        supportsFullyTransparentPixels in class ImageFormat
      • 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 class ImageFormat
      • 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 class ImageFormat
        See Also:
        KmzFormat