org.deegree_impl.model.cs
Class GeographicCoordinateSystem

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

public class GeographicCoordinateSystem
extends HorizontalCoordinateSystem

A coordinate system based on latitude and longitude. Some geographic coordinate systems are latitude/longiude, and some are longitude/latitude. You can find out which this is by examining the axes. You should also check the angular units, since not all geographic coordinate systems use degrees.

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

Nested Class Summary
private  class GeographicCoordinateSystem.Export
          Wrap a GeographicCoordinateSystem object for use with OpenGIS.
 
Nested classes inherited from class org.deegree_impl.model.cs.Info
Info.AngularUnit, Info.LinearUnit
 
Field Summary
private  PrimeMeridian meridian
          The prime meridian.
private static long serialVersionUID
          Serial number for interoperability with different versions.
private  Unit unit
          The angular unit.
static GeographicCoordinateSystem WGS84
          A geographic coordinate system using WGS84 datum.
 
Fields inherited from class org.deegree_impl.model.cs.HorizontalCoordinateSystem
 
Fields inherited from class org.deegree_impl.model.cs.Info
pool
 
Constructor Summary
(package private) GeographicCoordinateSystem(java.util.Map properties, Unit unit, HorizontalDatum datum, PrimeMeridian meridian, AxisInfo axis0, AxisInfo axis1)
          Creates a geographic coordinate system, which could be latitude/longiude or longitude/latitude.
  GeographicCoordinateSystem(java.lang.String name, HorizontalDatum datum)
          Creates a geographic coordinate system.
  GeographicCoordinateSystem(java.lang.String name, Unit unit, HorizontalDatum datum, PrimeMeridian meridian, AxisInfo axis0, AxisInfo axis1)
          Creates a geographic coordinate system, which could be latitude/longiude or longitude/latitude.
 
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.
 Envelope getDefaultEnvelope()
          Gets default envelope of coordinate system.
 PrimeMeridian getPrimeMeridian()
          Returns the prime meridian.
 Unit getUnits(int dimension)
          Gets units for dimension within coordinate system.
 java.util.Set getWGS84ConversionInfos()
          Gets details on conversions to WGS84.
(package private)  java.lang.Object toOpenGIS(java.lang.Object adapters)
          Returns an OpenGIS interface for this geographic coordinate system.
 
Methods inherited from class org.deegree_impl.model.cs.HorizontalCoordinateSystem
getAxis, getDatum, getDimension, getHorizontalDatum
 
Methods inherited from class org.deegree_impl.model.cs.CoordinateSystem
checkAxis, equals, 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

WGS84

public static final GeographicCoordinateSystem WGS84
A geographic coordinate system using WGS84 datum. This coordinate system use longitude/latitude ordinates with longitude values increasing north and latitude values increasing east. Angular units are degrees and prime meridian is Greenwich.


unit

private final Unit unit
The angular unit.


meridian

private final PrimeMeridian meridian
The prime meridian.

Constructor Detail

GeographicCoordinateSystem

public GeographicCoordinateSystem(java.lang.String name,
                                  HorizontalDatum datum)
Creates a geographic coordinate system. This coordinate system will use longitude/latitude ordinates with longitude values increasing east and latitude values increasing north. Angular units are degrees and prime meridian is Greenwich.

Parameters:
name - Name to give new object.
datum - Horizontal datum for created coordinate system.

GeographicCoordinateSystem

public GeographicCoordinateSystem(java.lang.String name,
                                  Unit unit,
                                  HorizontalDatum datum,
                                  PrimeMeridian meridian,
                                  AxisInfo axis0,
                                  AxisInfo axis1)
Creates a geographic coordinate system, which could be latitude/longiude or longitude/latitude.

Parameters:
name - Name to give new object.
unit - Angular units for created coordinate system.
datum - Horizontal datum for created coordinate system.
meridian - Prime Meridian for created coordinate system.
axis0 - Details of 0th ordinates.
axis1 - Details of 1st ordinates.

GeographicCoordinateSystem

GeographicCoordinateSystem(java.util.Map properties,
                           Unit unit,
                           HorizontalDatum datum,
                           PrimeMeridian meridian,
                           AxisInfo axis0,
                           AxisInfo axis1)
Creates a geographic coordinate system, which could be latitude/longiude or longitude/latitude.

Parameters:
properties - The set of properties (see Info).
unit - Angular units for created coordinate system.
datum - Horizontal datum for created coordinate system.
meridian - Prime Meridian for created coordinate system.
axis0 - Details of 0th ordinates.
axis1 - Details of 1st ordinates.
Method Detail

getUnits

public Unit getUnits(int dimension)
Gets units for dimension within coordinate system. This angular unit is the same for all axis.

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

getPrimeMeridian

public PrimeMeridian getPrimeMeridian()
Returns the prime meridian.

See Also:
CS_GeographicCoordinateSystem.getPrimeMeridian()

getDefaultEnvelope

public Envelope getDefaultEnvelope()
Gets default envelope of coordinate system.

Overrides:
getDefaultEnvelope in class CoordinateSystem
See Also:
CS_CoordinateSystem.getDefaultEnvelope()

getWGS84ConversionInfos

public java.util.Set getWGS84ConversionInfos()
Gets details on conversions to WGS84. Some geographic coordinate systems provide several transformations into WGS84, which are designed to provide good accuracy in different areas of interest. The first conversion should provide acceptable accuracy over the largest possible area of interest.

Returns:
A set of conversions info to WGS84. The default implementation returns an empty set.
See Also:
CS_GeographicCoordinateSystem.getNumConversionToWGS84(), CS_GeographicCoordinateSystem.getWGS84ConversionInfo(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 HorizontalCoordinateSystem
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 HorizontalCoordinateSystem

toOpenGIS

final java.lang.Object toOpenGIS(java.lang.Object adapters)
Returns an OpenGIS interface for this geographic 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 HorizontalCoordinateSystem