public abstract class CoreCommonImageMetadata
extends IIOMetadata
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.Modifier and Type | Field and Description |
---|---|
static String |
nativeMetadataFormatClassName
The name of the class implementing
IIOMetadataFormat and
representing the native metadata format for this object. |
static String |
nativeMetadataFormatName
The name of the native metadata format for this object.
|
Modifier | Constructor and Description |
---|---|
protected |
CoreCommonImageMetadata(boolean standardMetadataFormatSupported,
String nativeMetadataFormatName,
String nativeMetadataFormatClassName,
String[] extraMetadataFormatNames,
String[] extraMetadataFormatClassNames)
Private constructor
|
Modifier and Type | Method and Description |
---|---|
protected Node |
createCommonNativeTree()
Returns the XML DOM
Node object that represents the root
of a tree of metadata contained within this object on its native format. |
Node |
getAsTree(String formatName)
Returns an XML DOM
Node object that represents the root of
a tree of common stream metadata contained within this object according
to the conventions defined by a given metadata format name. |
protected int[] |
getColorInterpretations() |
int |
getColorInterpretations(int bandIndex)
Returns the colorInterpretation for the specified band
|
ColorModel |
getColorModel()
Returns the
ColorModel for the dataset held by this
object. |
String |
getDatasetDescription() |
String |
getDatasetName()
Returns the name of the dataset which is the source for this
IIOMetadata |
String |
getDescription()
Returns the description of the dataset which is the source for this
IIOMetadata |
String |
getDriverDescription()
Returns the description of the GDAL driver used to open the source
dataset for this
IIOMetadata |
String |
getDriverName()
Returns the name of the GDAL driver used to open the source dataset for
this
IIOMetadata |
int |
getGcpNumber()
Returns the number of Ground Control Points
|
String |
getGcpProjection()
Returns the Ground Control Point's projection
|
List<GCP> |
getGCPs()
Returns the Ground Control Points
|
double[] |
getGeoTransformation()
Returns the grid to world transformation of the image
|
int |
getHeight()
Returns the height of the image
|
double |
getMaximum(int bandIndex)
Returns the maximum value for the specified band
|
Double[] |
getMaximums() |
double |
getMinimum(int bandIndex)
Returns the minimum value for the specified band
|
Double[] |
getMinimums() |
double[] |
getNoData()
Returns the data for this dataset, as a range.
|
double |
getNoDataValue(int bandIndex)
Returns the noDataValue value for the specified band
|
Double[] |
getNoDataValues() |
int |
getNumBands()
Returns the number of bands of the dataset which is the source for this
IIOMetadata |
int[] |
getNumOverviews() |
int |
getNumOverviews(int bandIndex)
Returns the number of overviews for the specified band
|
double |
getOffset(int bandIndex)
Returns the offset value for the specified band
|
Double[] |
getOffsets() |
String |
getProjection()
Returns the projection
|
SampleModel |
getSampleModel()
Returns the
SampleModel for the dataset held by this
object. |
double |
getScale(int bandIndex)
Returns the scale value for the specified band
|
Double[] |
getScales() |
int |
getTileHeight()
Returns the tile height of the image
|
int |
getTileWidth()
Returns the tile width of the image
|
int |
getWidth()
Returns the width of the image
|
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.
|
protected void |
setColorInterpretations(int[] colorInterpretations) |
protected void |
setColorModel(ColorModel colorModel) |
protected void |
setDatasetDescription(String datasetDescription) |
protected void |
setDatasetName(String datasetName) |
protected void |
setDriverDescription(String driverDescription) |
protected void |
setDriverName(String driverName) |
protected void |
setGcpNumber(int gcpNumber) |
protected void |
setGcpProjection(String gcpProjection) |
protected void |
setGcps(List<GCP> gcps) |
protected void |
setGeoTransformation(double[] geoTransformation) |
protected void |
setHeight(int height) |
protected void |
setMaximums(Double[] maximums) |
protected void |
setMinimums(Double[] minimums) |
void |
setNoData(double[] noData)
Sets the nodata for this dataset.
|
protected void |
setNoDataValues(Double[] noDataValues) |
protected void |
setNumBands(int numBands) |
protected void |
setNumOverviews(int[] numOverviews) |
protected void |
setOffsets(Double[] offsets) |
protected void |
setProjection(String projection) |
protected void |
setSampleModel(SampleModel sampleModel) |
protected void |
setScales(Double[] scales) |
protected void |
setTileHeight(int tileHeight) |
protected void |
setTileWidth(int tileWidth) |
protected void |
setWidth(int width) |
activateController, getController, getDefaultController, getExtraMetadataFormatNames, getMetadataFormat, getMetadataFormatNames, getNativeMetadataFormatName, getStandardChromaNode, getStandardCompressionNode, getStandardDataNode, getStandardDimensionNode, getStandardDocumentNode, getStandardTextNode, getStandardTileNode, getStandardTransparencyNode, getStandardTree, hasController, isStandardMetadataFormatSupported, setController, setFromTree
public static final String nativeMetadataFormatName
public static final String nativeMetadataFormatClassName
IIOMetadataFormat
and
representing the native metadata format for this object.protected CoreCommonImageMetadata(boolean standardMetadataFormatSupported, String nativeMetadataFormatName, String nativeMetadataFormatClassName, String[] extraMetadataFormatNames, String[] extraMetadataFormatClassNames)
protected Node createCommonNativeTree()
Node
object that represents the root
of a tree of metadata contained within this object on its native format.public Node getAsTree(String formatName)
Node
object that represents the root of
a tree of common stream metadata contained within this object according
to the conventions defined by a given metadata format name.getAsTree
in class IIOMetadata
formatName
- the name of the requested metadata format. Note that
actually, the only supported format name is the
nativeMetadataFormatName
.
Requesting other format names will result in an
IllegalArgumentException
public boolean isReadOnly()
true
since this object does not support the
mergeTree
, setFromTree
, and
reset
methods.isReadOnly
in class IIOMetadata
true
since this IIOMetadata
object
cannot be modified.public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException
UnsupportedOperationException
mergeTree
in class IIOMetadata
IIOInvalidTreeException
javax.imageio.metadata.IIOMetadata#mergeTree()
,
isReadOnly()
public void reset()
UnsupportedOperationException
reset
in class IIOMetadata
IIOMetadata.reset()
,
isReadOnly()
public String getDatasetName()
IIOMetadata
public String getDescription()
IIOMetadata
public String getDriverName()
IIOMetadata
public String getDriverDescription()
IIOMetadata
public int getNumBands()
IIOMetadata
public int getWidth()
public int getHeight()
public int getTileHeight()
public int getTileWidth()
public ColorModel getColorModel()
ColorModel
for the dataset held by this
object.public SampleModel getSampleModel()
SampleModel
for the dataset held by this
object.public double[] getNoData()
null
public void setNoData(double[] noData)
null
noData
- public String getProjection()
protected void setGcps(List<GCP> gcps)
public double[] getGeoTransformation()
public int getGcpNumber()
public String getGcpProjection()
public List<GCP> getGCPs()
public Double[] getMaximums()
protected void setMaximums(Double[] maximums)
public Double[] getMinimums()
protected void setMinimums(Double[] minimums)
public Double[] getNoDataValues()
protected void setNoDataValues(Double[] noDataValues)
public Double[] getScales()
protected void setScales(Double[] scales)
public Double[] getOffsets()
protected void setOffsets(Double[] offsets)
public int[] getNumOverviews()
protected void setNumOverviews(int[] numOverviews)
public int getNumOverviews(int bandIndex)
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of rangepublic int getColorInterpretations(int bandIndex)
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of rangepublic double getMaximum(int bandIndex) throws IllegalArgumentException
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of range or
maximum value has not been foundpublic double getMinimum(int bandIndex) throws IllegalArgumentException
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of range or
minimum value has not been foundpublic double getScale(int bandIndex) throws IllegalArgumentException
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of range or
scale value has not been foundpublic double getOffset(int bandIndex) throws IllegalArgumentException
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of range or
offset value has not been foundpublic double getNoDataValue(int bandIndex) throws IllegalArgumentException
bandIndex
- the index of the required bandIllegalArgumentException
- in case the specified band number is out of range or
noDataValue has not been foundpublic String getDatasetDescription()
protected void setDatasetDescription(String datasetDescription)
protected void setDriverName(String driverName)
protected void setDriverDescription(String driverDescription)
protected void setDatasetName(String datasetName)
protected void setProjection(String projection)
protected void setGcpNumber(int gcpNumber)
protected void setGcpProjection(String gcpProjection)
protected void setWidth(int width)
protected void setHeight(int height)
protected void setTileHeight(int tileHeight)
protected void setTileWidth(int tileWidth)
protected void setColorModel(ColorModel colorModel)
protected void setSampleModel(SampleModel sampleModel)
protected void setNumBands(int numBands)
protected void setGeoTransformation(double[] geoTransformation)
protected int[] getColorInterpretations()
protected void setColorInterpretations(int[] colorInterpretations)
Copyright © 2006-2018 GeoSolutions. All Rights Reserved.