Class GrassBinaryImageMetadata
Object
IIOMetadata
GrassBinaryImageMetadata
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)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
the CATEGORIES_DESCRIPTOR key for the metadata tree.static final String
the COLOR_RULES_DESCRIPTOR key for the metadata tree.static final String
the CRS key for the metadata tree.static final String
the EAST key for the metadata tree.static final String[]
the list of supported metadata format names.static final String
the native metadata format name.static final String
the NCOLS key for the metadata tree.static final String
the NO_DATA key for the metadata tree.static final String
the NORTH key for the metadata tree.static final String
the NROWS key for the metadata tree.static final String
the REGION_DESCRIPTOR key for the metadata tree.static final String
the string used as separator in rules, to get them in one string.static final String
the SOUTH key for the metadata tree.static final String
the WEST key for the metadata tree.static final String
the XRES key for the metadata tree.static final String
the YRES key for the metadata tree.Fields inherited from class IIOMetadata
controller, defaultController, extraMetadataFormatClassNames, extraMetadataFormatNames, nativeMetadataFormatClassName, standardFormatSupported
-
Constructor Summary
ConstructorsConstructorDescriptionDefault 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 aGrassBinaryRasterReadHandler
to initialize the metadata fields. -
Method Summary
Modifier and TypeMethodDescriptiongetMetadataFormat
(String formatName) protected IIOMetadataNode
boolean
void
void
reset()
Creates a hashtable of the metadata for easier access.toString()
Methods inherited from class IIOMetadata
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormatNames, getNativeMetadataFormatName, getStandardChromaNode, getStandardDataNode, getStandardDimensionNode, getStandardDocumentNode, getStandardTextNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
-
Field Details
-
RULESSPLIT
the string used as separator in rules, to get them in one string.- See Also:
-
NO_DATA
the NO_DATA key for the metadata tree.- See Also:
-
NROWS
the NROWS key for the metadata tree.- See Also:
-
NCOLS
the NCOLS key for the metadata tree.- See Also:
-
XRES
the XRES key for the metadata tree.- See Also:
-
YRES
the YRES key for the metadata tree.- See Also:
-
SOUTH
the SOUTH key for the metadata tree.- See Also:
-
WEST
the WEST key for the metadata tree.- See Also:
-
NORTH
the NORTH key for the metadata tree.- See Also:
-
EAST
the EAST key for the metadata tree.- See Also:
-
CRS
the CRS key for the metadata tree.- See Also:
-
CATEGORIES_DESCRIPTOR
the CATEGORIES_DESCRIPTOR key for the metadata tree.- See Also:
-
COLOR_RULES_DESCRIPTOR
the COLOR_RULES_DESCRIPTOR key for the metadata tree.- See Also:
-
REGION_DESCRIPTOR
the REGION_DESCRIPTOR key for the metadata tree.- See Also:
-
nativeMetadataFormatName
the native metadata format name.- See Also:
-
metadataFormatNames
the list of supported metadata format names. In this case, only the native metadata format is supported.
-
-
Constructor Details
-
GrassBinaryImageMetadata
Constructs the object using aGrassBinaryRasterReadHandler
to initialize the metadata fields.- Parameters:
rasterReader
- inputGrassBinaryRasterReadHandler
used 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 Details
-
getAsTree
- Specified by:
getAsTree
in classIIOMetadata
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in classIIOMetadata
-
mergeTree
- Specified by:
mergeTree
in classIIOMetadata
- Throws:
IIOInvalidTreeException
-
reset
public void reset()- Specified by:
reset
in classIIOMetadata
-
getMetadataFormat
- Overrides:
getMetadataFormat
in classIIOMetadata
-
getStandardCompressionNode
- Overrides:
getStandardCompressionNode
in classIIOMetadata
-
toString
-
toHashMap
Creates a hashtable of the metadata for easier access.- Returns:
- the metadata hashtable.
-