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 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
-
-
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 aGrassBinaryRasterReadHandler
to initialize the metadata fields.
-
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
-
-
-
-
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 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 Detail
-
getAsTree
public Node getAsTree(String formatName)
- Specified by:
getAsTree
in classIIOMetadata
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in classIIOMetadata
-
mergeTree
public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException
- Specified by:
mergeTree
in classIIOMetadata
- Throws:
IIOInvalidTreeException
-
reset
public void reset()
- Specified by:
reset
in classIIOMetadata
-
getMetadataFormat
public IIOMetadataFormat getMetadataFormat(String formatName)
- Overrides:
getMetadataFormat
in classIIOMetadata
-
getStandardCompressionNode
protected IIOMetadataNode getStandardCompressionNode()
- Overrides:
getStandardCompressionNode
in classIIOMetadata
-
-