|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.image.io.metadata.MetadataAccessor
org.geotools.image.io.metadata.ImageGeometry
public class ImageGeometry
A combinaison of <Envelope>
and <RectifiedGrid>
elements in
geographic metadata format. This class offers similar
service than envelope and grid range
, except
that the maximum value for coordinate range and
grid range are inclusives.
The <GridEnvelope>
child element is typically (but not always) initialized
to the following ranges:
Constructor Summary | |
---|---|
protected |
ImageGeometry(GeographicMetadata metadata)
Creates a parser for a grid geometry. |
Method Summary | |
---|---|
void |
addOffsetVector(double[] values)
Adds offset vector values for a new dimension. |
void |
addOrdinates(int minIndex,
double[] values)
Adds ordinate values for an envelope along a dimension. |
int |
getDimension()
Returns the number of dimensions. |
NumberRange<java.lang.Integer> |
getGridRange(int dimension)
Returns the range of grid index along the specified dimension. |
double[] |
getOffsetVector(int dimension)
Returns the offset vector for the specified dimension. |
NumberRange<java.lang.Double> |
getOrdinateRange(int dimension)
Returns the range of ordinate values along the specified dimension. |
double[] |
getOrdinates(int dimension)
Returns the ordinate values along the specified dimension, or null if none. |
java.lang.String |
getPixelOrientation()
Returns the point in a pixel corresponding to the Earth location of the pixel, or null if not defined. |
void |
setGridRange(int dimension,
int minimum,
int maximum)
Set the grid range along the specified dimension. |
void |
setOffsetVector(int dimension,
double[] values)
Set the offset vector for the specified dimension. |
void |
setOrdinateRange(int dimension,
double minimum,
double maximum)
Set the envelope range along the specified dimension. |
void |
setOrdinates(int dimension,
double[] values)
Set the ordinate values along the specified dimension. |
void |
setPixelOrientation(java.lang.String pixelOrientation)
Set the pixel orientation to the specified value. |
Methods inherited from class org.geotools.image.io.metadata.MetadataAccessor |
---|
appendChild, childCount, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubles, getAttributeAsInteger, getAttributeAsIntegers, getAttributeAsString, getUserObject, getUserObject, selectChild, selectParent, setAttributeAsDate, setAttributeAsDouble, setAttributeAsDoubles, setAttributeAsInteger, setAttributeAsIntegers, setAttributeAsString, setUserObject, setWarningsEnabled, toString, trimFractionalPart, warningOccurred |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ImageGeometry(GeographicMetadata metadata)
GeographicMetadata.getGeometry()
instead.
metadata
- The metadata node.Method Detail |
---|
public int getDimension()
low
array
and the cells don't have the same dimension, then a warning is logged and
the smallest dimension is returned.
If one of them is empty, the dimension of the oter one is then returned.
public NumberRange<java.lang.Integer> getGridRange(int dimension)
"low"
or "high"
attribute were found for the
"rectifiedGridDomain/limits"
element.
dimension
- The dimension index, from 0 inclusive to getDimension()
exclusive.public void setGridRange(int dimension, int minimum, int maximum)
dimension
- The dimension to set. It can eventually be greater than getDimension()
.minimum
- The minimum value along the specified dimension (inclusive).maximum
- The maximum value along the specified dimension (inclusive).public NumberRange<java.lang.Double> getOrdinateRange(int dimension)
"lowerCorner"
or "upperCorner"
attribute were found for the
"boundedBy/Envelope"
element.
dimension
- The dimension index, from 0 inclusive to getDimension()
exclusive.public void setOrdinateRange(int dimension, double minimum, double maximum)
dimension
- The dimension to set. It can eventually be greater than getDimension()
.minimum
- The minimum value along the specified dimension (inclusive).maximum
- The maximum value along the specified dimension (inclusive).public double[] getOrdinates(int dimension)
null
if none.
This method returns a non-null values only if an array of was explicitly specified,
for example by a call to setOrdinates(int, double[])
.
dimension
- The dimension index, from 0 inclusive to getDimension()
exclusive.public void setOrdinates(int dimension, double[] values)
dimension
- The dimension to set, from 0 inclusive to getDimension()
exclusive.values
- The coordinate values.public void addOrdinates(int minIndex, double[] values)
addOffsetVector(double[])
when every cell
coordinates need to be specified explicitly.
minIndex
- The minimal index value, inclusive. This is usually 0.values
- The coordinate values.addOffsetVector(double[])
public double[] getOffsetVector(int dimension)
dimension
- The dimension index, from 0 inclusive to getDimension()
exclusive.public void setOffsetVector(int dimension, double[] values)
dimension
- The dimension to set, from 0 inclusive to getDimension()
exclusive.values
- The offset values.public void addOffsetVector(double[] values)
values
- The offset values for this new dimension.public java.lang.String getPixelOrientation()
null
if not defined. In the JAI framework, this is typically the
upper left corner.
In some OGC specifications, this is often the pixel
center.
pixelOrientation
- The pixel orientation (usually "center"
,
"lower left"
, "lower right"
, "upper right"
or "upper left"
), or null
if unknown.PixelOrientation
public void setPixelOrientation(java.lang.String pixelOrientation)
pixelOrientation
- The pixel orientation (usually "center"
,
"lower left"
, "lower right"
, "upper right"
or "upper left"
), or null
if unknown.PixelOrientation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |