org.deegree_impl.model.cs
Class LocalCoordinateSystem

java.lang.Object
  extended byorg.deegree_impl.model.cs.Info
      extended byorg.deegree_impl.model.cs.CoordinateSystem
          extended byorg.deegree_impl.model.cs.LocalCoordinateSystem
All Implemented Interfaces:
Dimensioned, java.io.Serializable

public class LocalCoordinateSystem
extends CoordinateSystem

A local coordinate system, with uncertain relationship to the world. In general, a local coordinate system cannot be related to other coordinate systems. However, if two objects supporting this interface have the same dimension, axes, units and datum then client code is permitted to assume that the two coordinate systems are identical. This allows several datasets from a common source (e.g. a CAD system) to be overlaid. In addition, some implementations of the Coordinate Transformation (CT) package may have a mechanism for correlating local datums. (E.g. from a database of transformations, which is created and maintained from real-world measurements.)

Version:
1.00
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux
See Also:
CS_LocalCoordinateSystem, Serialized Form

Nested Class Summary
private  class LocalCoordinateSystem.Export
          Wrap a LocalCoordinateSystem object for use with OpenGIS.
 
Nested classes inherited from class org.deegree_impl.model.cs.Info
Info.AngularUnit, Info.LinearUnit
 
Field Summary
private  AxisInfo[] axes
          Axes details.
private  LocalDatum datum
          The local datum.
private static long serialVersionUID
          Serial number for interoperability with different versions.
private  Unit[] units
          Units used along all axis.
 
Fields inherited from class org.deegree_impl.model.cs.Info
pool
 
Constructor Summary
(package private) LocalCoordinateSystem(java.util.Map properties, LocalDatum datum, Unit[] units, AxisInfo[] axes)
          Creates a local coordinate system.
  LocalCoordinateSystem(java.lang.String name, LocalDatum datum, Unit unit, AxisInfo[] axes)
          Creates a local coordinate system.
 
Method Summary
(package private)  java.lang.String addString(java.lang.StringBuffer buffer)
          Fill the part inside "[...]".
 boolean equivalents(CoordinateSystem cs)
          Returns true if this coordinate system is equivalents to the specified coordinate system.
 AxisInfo getAxis(int dimension)
          Gets axis details for dimension within coordinate system.
(package private)  Datum getDatum()
          Override CoordinateSystem.getDatum().
 int getDimension()
          Dimension of the coordinate system.
 LocalDatum getLocalDatum()
          Gets the local datum.
 Unit getUnits(int dimension)
          Gets units for dimension within coordinate system.
(package private)  java.lang.Object toOpenGIS(java.lang.Object adapters)
          Returns an OpenGIS interface for this local coordinate system.
 
Methods inherited from class org.deegree_impl.model.cs.CoordinateSystem
checkAxis, equals, getDefaultEnvelope, getUnits
 
Methods inherited from class org.deegree_impl.model.cs.Info
addUnit, cachedOpenGIS, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, getAbbreviation, getAlias, getAuthority, getAuthorityCode, getName, getRemarks, hashCode, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial number for interoperability with different versions.

See Also:
Constant Field Values

datum

private final LocalDatum datum
The local datum.


units

private final Unit[] units
Units used along all axis.


axes

private final AxisInfo[] axes
Axes details.

Constructor Detail

LocalCoordinateSystem

public LocalCoordinateSystem(java.lang.String name,
                             LocalDatum datum,
                             Unit unit,
                             AxisInfo[] axes)
Creates a local coordinate system. The dimension of the local coordinate system is determined by the size of the axis array. All the axes will have the same units. If you want to make a coordinate system with mixed units, then you can make a compound coordinate system from different local coordinate systems.

Parameters:
name - Name to give new object.
datum - Local datum to use in created coordinate system.
unit - Units to use for all axes in created coordinate system.
axes - Axes to use in created coordinate system.

LocalCoordinateSystem

LocalCoordinateSystem(java.util.Map properties,
                      LocalDatum datum,
                      Unit[] units,
                      AxisInfo[] axes)
Creates a local coordinate system.

Parameters:
properties - The set of properties (see Info).
datum - Local datum to use in created coordinate system.
units - Units to use in created coordinate system.
axes - Axes to use in created coordinate system.
Method Detail

getDatum

final Datum getDatum()
Override CoordinateSystem.getDatum().

Overrides:
getDatum in class CoordinateSystem

getLocalDatum

public LocalDatum getLocalDatum()
Gets the local datum.

See Also:
CS_LocalCoordinateSystem.getLocalDatum()

getDimension

public int getDimension()
Dimension of the coordinate system.

Specified by:
getDimension in interface Dimensioned
Specified by:
getDimension in class CoordinateSystem
See Also:
CS_CoordinateSystem.getDimension()

getAxis

public AxisInfo getAxis(int dimension)
Gets axis details for dimension within coordinate system.

Specified by:
getAxis in class CoordinateSystem
Parameters:
dimension - Zero based index of axis.
See Also:
CS_CoordinateSystem.getAxis(int)

getUnits

public Unit getUnits(int dimension)
Gets units for dimension within coordinate system.

Specified by:
getUnits in class CoordinateSystem
Parameters:
dimension - Zero based index of axis.
See Also:
CS_CoordinateSystem.getUnits(int)

equivalents

public boolean equivalents(CoordinateSystem cs)
Returns true if this coordinate system is equivalents to the specified coordinate system. Two coordinate systems are considered equivalent if the CoordinateTransformation from this to cs would be the identity transform. The default implementation compare datum, units and axis, but ignore name, alias and other meta-data informations.

Overrides:
equivalents in class CoordinateSystem
Parameters:
cs - The coordinate system (may be null).
Returns:
true if both coordinate systems are equivalent.

addString

java.lang.String addString(java.lang.StringBuffer buffer)
Fill the part inside "[...]". Used for formatting Well Know Text (WKT).

Overrides:
addString in class Info
Parameters:
buffer - The buffer to add string to.
Returns:
The WKT code name (e.g. "GEOGCS").

toOpenGIS

final java.lang.Object toOpenGIS(java.lang.Object adapters)
Returns an OpenGIS interface for this local coordinate system. The returned object is suitable for RMI use. Note: The returned type is a generic Object in order to avoid too early class loading of OpenGIS interface.

Overrides:
toOpenGIS in class CoordinateSystem