Class GrassBinaryImageMetadata


  • public final class GrassBinaryImageMetadata
    extends IIOMetadata
    Represents the metadata associated with the native grass binary map.

    Supported metadata entries are for now:

    1. those to create the region information:
    2. those to create the color table information:
    3. those to create the categories information:
    4. the novalue
    Since:
    3.0
    Author:
    Andrea Antonello (www.hydrologis.com)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String CATEGORIES_DESCRIPTOR
      the CATEGORIES_DESCRIPTOR key for the metadata tree.
      static String COLOR_RULES_DESCRIPTOR
      the COLOR_RULES_DESCRIPTOR key for the metadata tree.
      static String CRS
      the CRS key for the metadata tree.
      static String EAST
      the EAST key for the metadata tree.
      static String[] metadataFormatNames
      the list of supported metadata format names.
      static String nativeMetadataFormatName
      the native metadata format name.
      static String NCOLS
      the NCOLS key for the metadata tree.
      static String NO_DATA
      the NO_DATA key for the metadata tree.
      static String NORTH
      the NORTH key for the metadata tree.
      static String NROWS
      the NROWS key for the metadata tree.
      static String REGION_DESCRIPTOR
      the REGION_DESCRIPTOR key for the metadata tree.
      static String RULESSPLIT
      the string used as separator in rules, to get them in one string.
      static String SOUTH
      the SOUTH key for the metadata tree.
      static String WEST
      the WEST key for the metadata tree.
      static String XRES
      the XRES key for the metadata tree.
      static String YRES
      the YRES key for the metadata tree.
      • Fields inherited from class IIOMetadata

        controller, defaultController, extraMetadataFormatClassNames, extraMetadataFormatNames, nativeMetadataFormatClassName, standardFormatSupported
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Node getAsTree​(String formatName)  
      IIOMetadataFormat getMetadataFormat​(String formatName)  
      protected IIOMetadataNode getStandardCompressionNode()  
      boolean isReadOnly()  
      void mergeTree​(String formatName, Node root)  
      void reset()  
      HashMap<String,​String> toHashMap()
      Creates a hashtable of the metadata for easier access.
      String toString()  
      • Methods inherited from class IIOMetadata

        activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormatNames, getNativeMetadataFormatName, getStandardChromaNode, getStandardDataNode, getStandardDimensionNode, getStandardDocumentNode, getStandardTextNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • RULESSPLIT

        public static final String RULESSPLIT
        the string used as separator in rules, to get them in one string.
        See Also:
        Constant Field Values
      • NO_DATA

        public static final String NO_DATA
        the NO_DATA key for the metadata tree.
        See Also:
        Constant Field Values
      • NROWS

        public static final String NROWS
        the NROWS key for the metadata tree.
        See Also:
        Constant Field Values
      • NCOLS

        public static final String NCOLS
        the NCOLS key for the metadata tree.
        See Also:
        Constant Field Values
      • XRES

        public static final String XRES
        the XRES key for the metadata tree.
        See Also:
        Constant Field Values
      • YRES

        public static final String YRES
        the YRES key for the metadata tree.
        See Also:
        Constant Field Values
      • SOUTH

        public static final String SOUTH
        the SOUTH key for the metadata tree.
        See Also:
        Constant Field Values
      • WEST

        public static final String WEST
        the WEST key for the metadata tree.
        See Also:
        Constant Field Values
      • NORTH

        public static final String NORTH
        the NORTH key for the metadata tree.
        See Also:
        Constant Field Values
      • EAST

        public static final String EAST
        the EAST key for the metadata tree.
        See Also:
        Constant Field Values
      • CATEGORIES_DESCRIPTOR

        public static final String CATEGORIES_DESCRIPTOR
        the CATEGORIES_DESCRIPTOR key for the metadata tree.
        See Also:
        Constant Field Values
      • COLOR_RULES_DESCRIPTOR

        public static final String COLOR_RULES_DESCRIPTOR
        the COLOR_RULES_DESCRIPTOR key for the metadata tree.
        See Also:
        Constant Field Values
      • REGION_DESCRIPTOR

        public static final String REGION_DESCRIPTOR
        the REGION_DESCRIPTOR key for the metadata tree.
        See Also:
        Constant Field Values
      • nativeMetadataFormatName

        public static final String nativeMetadataFormatName
        the native metadata format name.
        See Also:
        Constant Field Values
      • metadataFormatNames

        public static final String[] metadataFormatNames
        the list of supported metadata format names. In this case, only the native metadata format is supported.
    • Constructor Detail

      • GrassBinaryImageMetadata

        public GrassBinaryImageMetadata()
        Default constructor.
      • GrassBinaryImageMetadata

        public GrassBinaryImageMetadata​(int cols,
                                        int rows,
                                        double xRes,
                                        double yRes,
                                        double north,
                                        double south,
                                        double east,
                                        double west,
                                        double inNoData,
                                        List<String> colorRules,
                                        List<String> categories)
        Constructs the object using user supplied metadata.
        Parameters:
        cols - the number of columns.
        rows - the number of rows.
        xRes - the x size of the grid cell.
        yRes - the y size of the grid cell.
        north - the northern boundary.
        south - the southern boundary.
        east - the eastern boundary.
        west - the western boundary.
        inNoData - the value associated to noData grid values.
        colorRules - the list of colorrules.
        categories - the list of categories.
    • Method Detail

      • getAsTree

        public Node getAsTree​(String formatName)
        Specified by:
        getAsTree in class IIOMetadata
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in class IIOMetadata
      • mergeTree

        public void mergeTree​(String formatName,
                              Node root)
                       throws IIOInvalidTreeException
        Specified by:
        mergeTree in class IIOMetadata
        Throws:
        IIOInvalidTreeException
      • reset

        public void reset()
        Specified by:
        reset in class IIOMetadata
      • getMetadataFormat

        public IIOMetadataFormat getMetadataFormat​(String formatName)
        Overrides:
        getMetadataFormat in class IIOMetadata
      • getStandardCompressionNode

        protected IIOMetadataNode getStandardCompressionNode()
        Overrides:
        getStandardCompressionNode in class IIOMetadata
      • toString

        public String toString()
        Overrides:
        toString in class Object
      • toHashMap

        public HashMap<String,​String> toHashMap()
        Creates a hashtable of the metadata for easier access.
        Returns:
        the metadata hashtable.