Class GrassBinaryImageMetadata
- Object
-
- IIOMetadata
-
- GrassBinaryImageMetadata
-
public final class GrassBinaryImageMetadata extends IIOMetadata
Represents the metadata associated with the native grass binary map.Supported metadata entries are for now:
- those to create the region information:
- north
- south
- east
- west
- rows
- cols
- x resolution
- y resolution
- those to create the color table information:
- the color rules
- those to create the categories information:
- the categories
- the novalue
- Since:
- 3.0
- Author:
- Andrea Antonello (www.hydrologis.com)
- those to create the region information:
-
-
Field Summary
Fields Modifier and Type Field Description static StringCATEGORIES_DESCRIPTORthe CATEGORIES_DESCRIPTOR key for the metadata tree.static StringCOLOR_RULES_DESCRIPTORthe COLOR_RULES_DESCRIPTOR key for the metadata tree.static StringCRSthe CRS key for the metadata tree.static StringEASTthe EAST key for the metadata tree.static String[]metadataFormatNamesthe list of supported metadata format names.static StringnativeMetadataFormatNamethe native metadata format name.static StringNCOLSthe NCOLS key for the metadata tree.static StringNO_DATAthe NO_DATA key for the metadata tree.static StringNORTHthe NORTH key for the metadata tree.static StringNROWSthe NROWS key for the metadata tree.static StringREGION_DESCRIPTORthe REGION_DESCRIPTOR key for the metadata tree.static StringRULESSPLITthe string used as separator in rules, to get them in one string.static StringSOUTHthe SOUTH key for the metadata tree.static StringWESTthe WEST key for the metadata tree.static StringXRESthe XRES key for the metadata tree.static StringYRESthe YRES key for the metadata tree.-
Fields inherited from class IIOMetadata
controller, defaultController, extraMetadataFormatClassNames, extraMetadataFormatNames, nativeMetadataFormatClassName, standardFormatSupported
-
-
Constructor Summary
Constructors Constructor Description GrassBinaryImageMetadata()Default constructor.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.GrassBinaryImageMetadata(GrassBinaryRasterReadHandler rasterReader)Constructs the object using aGrassBinaryRasterReadHandlerto initialize the metadata fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodegetAsTree(String formatName)IIOMetadataFormatgetMetadataFormat(String formatName)protected IIOMetadataNodegetStandardCompressionNode()booleanisReadOnly()voidmergeTree(String formatName, Node root)voidreset()HashMap<String,String>toHashMap()Creates a hashtable of the metadata for easier access.StringtoString()-
Methods inherited from class IIOMetadata
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormatNames, getNativeMetadataFormatName, getStandardChromaNode, getStandardDataNode, getStandardDimensionNode, getStandardDocumentNode, getStandardTextNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
-
-
-
-
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
-
CRS
public static final String CRS
the CRS 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(GrassBinaryRasterReadHandler rasterReader)
Constructs the object using aGrassBinaryRasterReadHandlerto initialize the metadata fields.- Parameters:
rasterReader- inputGrassBinaryRasterReadHandlerused to retrieve the metadata of the native grass raster file.
-
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:
getAsTreein classIIOMetadata
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin classIIOMetadata
-
mergeTree
public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException
- Specified by:
mergeTreein classIIOMetadata- Throws:
IIOInvalidTreeException
-
reset
public void reset()
- Specified by:
resetin classIIOMetadata
-
getMetadataFormat
public IIOMetadataFormat getMetadataFormat(String formatName)
- Overrides:
getMetadataFormatin classIIOMetadata
-
getStandardCompressionNode
protected IIOMetadataNode getStandardCompressionNode()
- Overrides:
getStandardCompressionNodein classIIOMetadata
-
-