org.geotools.image.io.metadata
Class ImageReferencing

java.lang.Object
  extended by org.geotools.image.io.metadata.MetadataAccessor
      extended by org.geotools.image.io.metadata.ImageReferencing

public class ImageReferencing
extends MetadataAccessor

A <CoordinateReferenceSystem> element in geographic metadata format, together with its <CoordinateSystem> and <Datum> child elements.

Since:
2.4
Version:
$Id: ImageReferencing.java 30996 2008-07-10 13:28:59Z cedricbr $
Author:
Martin Desruisseaux, Cédric Briançon

Constructor Summary
protected ImageReferencing(GeographicMetadata metadata)
          Creates a parser for a coordinate system.
 
Method Summary
 Axis addAxis(java.lang.String name, java.lang.String direction, java.lang.String units)
          Adds an axis to the coordinate system.
 Parameter addParameter(java.lang.String name, double value)
          Adds an parameter to the projection.
 Axis getAxis(int index)
          Returns the axis at the specified index.
 Identification getCoordinateReferenceSystem()
          Returns the name and type of the coordinate reference system.
 Identification getCoordinateSystem()
          Returns the name and type of the coordinate system, or null if it is not defined.
 Identification getDatum()
          Returns the name and type of the datum, or null if it is not defined.
 int getDimension()
          Returns the number of dimensions, which is the number of axes of the coordinate system.
 java.lang.String getEllipsoidName()
          Returns the name of the ellipsoid, or null if not defined.
 java.lang.String getEllipsoidUnit()
          Returns the unit of the ellipsoid, or null if it is not defined.
 double getInverseFlattening()
          Returns the inverseFlattening value for this ellipsoid, or null if not defined.
 Parameter getParameter(int index)
          Returns the parameter at the index for the projection, or null if not defined.
 Parameter[] getParameters()
          Returns all parameters found for the projection in an array, or an empty array if no parameters have been defined, but never null.
 double getPrimeMeridianGreenwichLongitude()
          Returns the prime meridian greenwich longitude, or Double.NaN if this value is not defined.
 java.lang.String getPrimeMeridianName()
          Returns the prime meridian name, or null if not defined.
 java.lang.String getProjectionName()
          Returns the name of the Projection projection, or null if not defined.
 double getSemiMajorAxis()
          Returns the semi-major axis value for this ellipsoid.
 double getSemiMinorAxis()
          Returns the semi-minor axis value for this ellipsoid, or Double.NaN if not defined.
 java.lang.String getWKT()
          Deprecated. 
 void setCoordinateReferenceSystem(java.lang.String name, java.lang.String type)
          Sets the name and type of the coordinate reference system.
 void setCoordinateSystem(java.lang.String name, java.lang.String type)
          Sets the name and type of the coordinate system.
 void setDatum(java.lang.String name, java.lang.String type)
          Sets the name and type of the datum.
 void setEllipsoidName(java.lang.String name)
          Sets the name of the ellipsoid.
 void setEllipsoidUnit(java.lang.String unit)
          Sets the unit of the ellipsoid.
 void setInverseFlattening(double value)
          Sets the inverseFlattening value of the ellipsoid.
 void setPrimeMeridianGreenwichLongitude(double greenwichLongitude)
          Sets the greenwich longitude for the prime meridian.
 void setPrimeMeridianName(java.lang.String name)
          Sets the name of the prime meridian.
 void setProjectionName(java.lang.String name)
          Sets the name of the projection.
 void setSemiMajorAxis(double value)
          Sets the semi-major axis value of the ellipsoid.
 void setSemiMinorAxis(double value)
          Sets the semi-minor axis value of the ellipsoid.
 void setWKT(java.lang.String wkt)
          Deprecated. 
 
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

ImageReferencing

protected ImageReferencing(GeographicMetadata metadata)
Creates a parser for a coordinate system. This constructor should not be invoked directly; use GeographicMetadata.getReferencing() instead.

Parameters:
metadata - The metadata node.
Method Detail

getDimension

public int getDimension()
Returns the number of dimensions, which is the number of axes of the coordinate system.


getCoordinateReferenceSystem

public Identification getCoordinateReferenceSystem()
Returns the name and type of the coordinate reference system.

See Also:
CoordinateReferenceSystem

setCoordinateReferenceSystem

public void setCoordinateReferenceSystem(java.lang.String name,
                                         java.lang.String type)
Sets the name and type of the coordinate reference system.

Parameters:
name - The coordinate reference system name, or null if unknown.
type - The coordinate reference system type (usually or ), or null if unknown.
See Also:
CoordinateReferenceSystem

getCoordinateSystem

public Identification getCoordinateSystem()
Returns the name and type of the coordinate system, or null if it is not defined.

See Also:
CoordinateSystem

setCoordinateSystem

public void setCoordinateSystem(java.lang.String name,
                                java.lang.String type)
Sets the name and type of the coordinate system.

Parameters:
name - The coordinate system name, or null if unknown.
type - The coordinate system type (usually or ), or null if unknown.
See Also:
CoordinateSystem

getDatum

public Identification getDatum()
Returns the name and type of the datum, or null if it is not defined.

See Also:
Datum

setDatum

public void setDatum(java.lang.String name,
                     java.lang.String type)
Sets the name and type of the datum.

Parameters:
name - The datum name, or null if unknown.
type - The datum type (usually ), or null if unknown.
See Also:
Datum

getEllipsoidName

public java.lang.String getEllipsoidName()
Returns the name of the ellipsoid, or null if not defined.

See Also:
Ellipsoid

setEllipsoidName

public void setEllipsoidName(java.lang.String name)
Sets the name of the ellipsoid.

Parameters:
name - The ellipsoid name, or null if unknown.
See Also:
Ellipsoid

getEllipsoidUnit

public java.lang.String getEllipsoidUnit()
Returns the unit of the ellipsoid, or null if it is not defined.

See Also:
Ellipsoid

setEllipsoidUnit

public void setEllipsoidUnit(java.lang.String unit)
Sets the unit of the ellipsoid.

Parameters:
unit - The ellipsoid unit, or null if unknown.
See Also:
Ellipsoid

getSemiMajorAxis

public double getSemiMajorAxis()
Returns the semi-major axis value for this ellipsoid. or Double.NaN if not defined.

See Also:
Ellipsoid

setSemiMajorAxis

public void setSemiMajorAxis(double value)
Sets the semi-major axis value of the ellipsoid.

Parameters:
value - The semi-major axis value, or null if unknown.
See Also:
Ellipsoid

getSemiMinorAxis

public double getSemiMinorAxis()
Returns the semi-minor axis value for this ellipsoid, or Double.NaN if not defined.

See Also:
Ellipsoid

setSemiMinorAxis

public void setSemiMinorAxis(double value)
Sets the semi-minor axis value of the ellipsoid. This method should be called only if the setInverseFlattening(double) method has not already been called.

Parameters:
value - The semi-minor axis value, or null if unknown.
See Also:
Ellipsoid

getInverseFlattening

public double getInverseFlattening()
Returns the inverseFlattening value for this ellipsoid, or null if not defined.

See Also:
Ellipsoid

setInverseFlattening

public void setInverseFlattening(double value)
Sets the inverseFlattening value of the ellipsoid. This method should be called only if the setSemiMinorAxis(double) method has not already been called.

Parameters:
value - The inverseFlattening value, or null if unknown.
See Also:
Ellipsoid

getAxis

public Axis getAxis(int index)
             throws java.lang.IndexOutOfBoundsException
Returns the axis at the specified index.

Parameters:
index - the axis index, ranging from 0 inclusive to getDimension() exclusive.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

addAxis

public Axis addAxis(java.lang.String name,
                    java.lang.String direction,
                    java.lang.String units)
Adds an axis to the coordinate system.

Parameters:
name - The axis name, or null if unknown.
direction - The axis direction (usually "east", "weast", "north", "south", "up" or "down"), or null if unknown.
units - The axis units symbol, or null if unknown.
See Also:
CoordinateSystemAxis, AxisDirection

getParameter

public Parameter getParameter(int index)
                       throws java.lang.IndexOutOfBoundsException
Returns the parameter at the index for the projection, or null if not defined.

Parameters:
index - the parameter index.
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of bounds.

getParameters

public Parameter[] getParameters()
Returns all parameters found for the projection in an array, or an empty array if no parameters have been defined, but never null.


addParameter

public Parameter addParameter(java.lang.String name,
                              double value)
Adds an parameter to the projection.

Parameters:
name - The parameter name, or null if unknown.
value - The value for this parameter, or Double.NaN if unknown.
See Also:
ParameterValue

getPrimeMeridianName

public java.lang.String getPrimeMeridianName()
Returns the prime meridian name, or null if not defined.


setPrimeMeridianName

public void setPrimeMeridianName(java.lang.String name)
Sets the name of the prime meridian.

Parameters:
name - The name of the prime meridian, or null if not known.

getPrimeMeridianGreenwichLongitude

public double getPrimeMeridianGreenwichLongitude()
Returns the prime meridian greenwich longitude, or Double.NaN if this value is not defined.


setPrimeMeridianGreenwichLongitude

public void setPrimeMeridianGreenwichLongitude(double greenwichLongitude)
Sets the greenwich longitude for the prime meridian.

Parameters:
greenwichLongitude - The greenwich longitude for the prime meridian, or null if not known.

getProjectionName

public java.lang.String getProjectionName()
Returns the name of the Projection projection, or null if not defined.


setProjectionName

public void setProjectionName(java.lang.String name)
Sets the name of the projection.

Parameters:
name - The projection name, or null if unknown.
See Also:
Projection

getWKT

@Deprecated
public java.lang.String getWKT()
Deprecated. 

Returns the coordinate reference system in Well Known Text format, or null if none.


setWKT

@Deprecated
public void setWKT(java.lang.String wkt)
Deprecated. 

Sets the coordinate reference system in Well Known Text format.



Copyright © 1996-2010 Geotools. All Rights Reserved.