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 Stringthe CATEGORIES_DESCRIPTOR key for the metadata tree.static final Stringthe COLOR_RULES_DESCRIPTOR key for the metadata tree.static final Stringthe CRS key for the metadata tree.static final Stringthe EAST key for the metadata tree.static final String[]the list of supported metadata format names.static final Stringthe native metadata format name.static final Stringthe NCOLS key for the metadata tree.static final Stringthe NO_DATA key for the metadata tree.static final Stringthe NORTH key for the metadata tree.static final Stringthe NROWS key for the metadata tree.static final Stringthe REGION_DESCRIPTOR key for the metadata tree.static final Stringthe string used as separator in rules, to get them in one string.static final Stringthe SOUTH key for the metadata tree.static final Stringthe WEST key for the metadata tree.static final Stringthe XRES key for the metadata tree.static final Stringthe 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 aGrassBinaryRasterReadHandlerto initialize the metadata fields. -
Method Summary
Modifier and TypeMethodDescriptiongetMetadataFormat(String formatName) protected IIOMetadataNodebooleanvoidvoidreset()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 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 Details
-
getAsTree
- Specified by:
getAsTreein classIIOMetadata
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnlyin classIIOMetadata
-
mergeTree
- Specified by:
mergeTreein classIIOMetadata- Throws:
IIOInvalidTreeException
-
reset
public void reset()- Specified by:
resetin classIIOMetadata
-
getMetadataFormat
- Overrides:
getMetadataFormatin classIIOMetadata
-
getStandardCompressionNode
- Overrides:
getStandardCompressionNodein classIIOMetadata
-
toString
-
toHashMap
Creates a hashtable of the metadata for easier access.- Returns:
- the metadata hashtable.
-