it.geosolutions.imageio.gdalframework
Class GDALCommonIIOImageMetadata

Object
  extended by IIOMetadata
      extended by CoreCommonImageMetadata
          extended by GDALCommonIIOImageMetadata
Direct Known Subclasses:
GDALWritableCommonIIOImageMetadata

public class GDALCommonIIOImageMetadata
extends CoreCommonImageMetadata

Class needed to store all available information of a GDAL Dataset with the add of additional information. For convenience and future re-use this class also represents an IIOMetadata. A wide set of getters method allow to retrieve several information directly from the metadata instance, without need of getting the XML DOM nodes tree.

Author:
Simone Giannecchini, GeoSolutions., Daniele Romagnoli, GeoSolutions.

Field Summary
 
Fields inherited from class CoreCommonImageMetadata
nativeMetadataFormatClassName, nativeMetadataFormatName
 
Fields inherited from class IIOMetadata
controller, defaultController, extraMetadataFormatClassNames, extraMetadataFormatNames, standardFormatSupported
 
Constructor Summary
GDALCommonIIOImageMetadata(Dataset dataset, String name, boolean initializationRequired)
          Constructor which initializes fields by retrieving properties such as raster size, raster tiling properties, projection, and more from a given input Dataset if not null.
GDALCommonIIOImageMetadata(Dataset dataset, String name, boolean initializationRequired, String formatName, String formatClassName)
          GDALCommonIIOImageMetadata constructor.
GDALCommonIIOImageMetadata(Dataset dataset, String name, String formatName, String formatClassName)
          Constructor which initializes fields by retrieving properties such as raster size, raster tiling properties, projection, and more from a given input Dataset.
GDALCommonIIOImageMetadata(String sDatasetName)
          GDALCommonIIOImageMetadata constructor.
GDALCommonIIOImageMetadata(String sDatasetName, String formatName, String formatClassName)
          GDALCommonIIOImageMetadata constructor.
 
Method Summary
 GDALWritableCommonIIOImageMetadata asWritable()
          Returns a copy of this GDALCommonIIOImageMetadata as a GDALWritableCommonIIOImageMetadata instance, with setting capabilities
 List<? extends GCP> getGCPs()
          Returns the Ground Control Points
protected  Map getGdalMetadataDomain(String metadataDomain)
          Returns a Map representing metadata elements (key,value) for a specific domain of GDAL metadata.
protected  List<String> getGdalMetadataDomainsList()
          Return all the available metadata domains.
 boolean isReadOnly()
          Returns true since this object does not support the mergeTree, setFromTree, and reset methods.
 void mergeTree(String formatName, Node root)
          Method unsupported.
 void reset()
          Method unsupported.
 
Methods inherited from class CoreCommonImageMetadata
createCommonNativeTree, getAsTree, getColorInterpretations, getColorInterpretations, getColorModel, getDatasetDescription, getDatasetName, getDescription, getDriverDescription, getDriverName, getGcpNumber, getGcpProjection, getGeoTransformation, getHeight, getMaximum, getMaximums, getMinimum, getMinimums, getNoDataValue, getNoDataValues, getNumBands, getNumOverviews, getNumOverviews, getOffset, getOffsets, getProjection, getSampleModel, getScale, getScales, getTileHeight, getTileWidth, getWidth, setColorInterpretations, setColorModel, setDatasetDescription, setDatasetName, setDriverDescription, setDriverName, setGcpNumber, setGcpProjection, setGcps, setGeoTransformation, setHeight, setMaximums, setMinimums, setNoDataValues, setNumBands, setNumOverviews, setOffsets, setProjection, setSampleModel, setScales, setTileHeight, setTileWidth, setWidth
 
Methods inherited from class IIOMetadata
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormat, getMetadataFormatNames, getNativeMetadataFormatName, getStandardChromaNode, getStandardCompressionNode, getStandardDataNode, getStandardDimensionNode, getStandardDocumentNode, getStandardTextNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GDALCommonIIOImageMetadata

public GDALCommonIIOImageMetadata(String sDatasetName)
GDALCommonIIOImageMetadata constructor. Firstly, it provides to open a dataset from the specified input dataset name. Then, it call the constructor which initializes all fields with dataset properties, such as raster size, raster tiling properties, projection, and more.

Parameters:
sDatasetName - The name (usually a File path or a subdataset name when the format supports subdatasets) of the dataset we want to open.

GDALCommonIIOImageMetadata

public GDALCommonIIOImageMetadata(String sDatasetName,
                                  String formatName,
                                  String formatClassName)
GDALCommonIIOImageMetadata constructor. Firstly, it provides to open a dataset from the specified input dataset name. Then, it call the constructor which initializes all fields with dataset properties, such as raster size, raster tiling properties, projection, and more.

Parameters:
sDatasetName - The name (usually a File path or a subdataset name when the format supports subdatasets) of the dataset we want to open.
formatName - the name of the native metadata format
formatClassName - the name of the class of the native metadata format

GDALCommonIIOImageMetadata

public GDALCommonIIOImageMetadata(Dataset dataset,
                                  String name,
                                  boolean initializationRequired,
                                  String formatName,
                                  String formatClassName)
GDALCommonIIOImageMetadata constructor.

Parameters:
dataset - the input Dataset on which build the common metadata object.
name - the name to be set for the dataset represented by this common metadata object.
initializationRequired - specify if initializing fields is required or not.
formatName - the name of the native metadata format
formatClassName - the name of the class of the native metadata format

GDALCommonIIOImageMetadata

public GDALCommonIIOImageMetadata(Dataset dataset,
                                  String name,
                                  String formatName,
                                  String formatClassName)
Constructor which initializes fields by retrieving properties such as raster size, raster tiling properties, projection, and more from a given input Dataset.

Parameters:
dataset - the Dataset used to initialize all the common metadata fields.
name - the dataset name
formatName - the name of the native metadata format
formatClassName - the name of the class of the native metadata format

GDALCommonIIOImageMetadata

public GDALCommonIIOImageMetadata(Dataset dataset,
                                  String name,
                                  boolean initializationRequired)
Constructor which initializes fields by retrieving properties such as raster size, raster tiling properties, projection, and more from a given input Dataset if not null.

Parameters:
dataset - the Dataset used to initialize all the common metadata fields.
name - the dataset name
Method Detail

isReadOnly

public boolean isReadOnly()
Returns true since this object does not support the mergeTree, setFromTree, and reset methods.

Overrides:
isReadOnly in class CoreCommonImageMetadata
Returns:
true since this IIOMetadata object cannot be modified.

mergeTree

public void mergeTree(String formatName,
                      Node root)
               throws IIOInvalidTreeException
Method unsupported. Calling this method will throws an UnsupportedOperationException

Overrides:
mergeTree in class CoreCommonImageMetadata
Throws:
IIOInvalidTreeException
See Also:
javax.imageio.metadata.IIOMetadata#mergeTree(), isReadOnly()

reset

public void reset()
Method unsupported. Calling this method will throws an UnsupportedOperationException

Overrides:
reset in class CoreCommonImageMetadata
See Also:
IIOMetadata.reset(), isReadOnly()

getGCPs

public List<? extends GCP> getGCPs()
Returns the Ground Control Points

Overrides:
getGCPs in class CoreCommonImageMetadata

getGdalMetadataDomain

protected Map getGdalMetadataDomain(String metadataDomain)
Returns a Map representing metadata elements (key,value) for a specific domain of GDAL metadata.

Parameters:
metadataDomain - the requested GDAL metadata domain.
Returns:
the metadata mapping for the specified domain or null in case no metadata is available for the domain or the specified domain is unsupported.
See Also:
GDALUtilities.GDALMetadataDomain

getGdalMetadataDomainsList

protected List<String> getGdalMetadataDomainsList()
Return all the available metadata domains.

Returns:
a list of Strings representing metadata domains defined for the dataset on which this instance is based.

asWritable

public GDALWritableCommonIIOImageMetadata asWritable()
Returns a copy of this GDALCommonIIOImageMetadata as a GDALWritableCommonIIOImageMetadata instance, with setting capabilities



Copyright © 2006-2010 GeoSolutions. All Rights Reserved.