ebgeo.maprequest.cs
Class MRCoordinateSystem

java.lang.Object
  extended byebgeo.maprequest.cs.MRCoordinateSystem

public class MRCoordinateSystem
extends Object

A coordinate system. For MapRequest a coordinate system is the combination of a datum and projection. For any mathematical operations the WKT form of these objects are combined to produce a geotools CoordinateSystem.


Field Summary
static String REALM_OZI_EXPLORER
          Realm to represent OziExplorer common names.
static String REALM_OZI_EXPLORER_CODE
          Realm to represent OziExplorer codes.
static String REALM_OZI_EXPLORER_PROJECTION_PARAMS
          Realm to represent OziExplorer map projection parameters.
static String REALM_OZI_EXPLORER_UNIT_MULTIPLIER
          Realm to represent OziExplorer unit multiplier
static String REALM_OZI_EXPLORER_USE_LATLONG_FOR_GRID
          Realm to tell OziExplorer to output grid coordinates as lat/long
 
Constructor Summary
MRCoordinateSystem(MRDatum datum, MRProjection projection)
          Construct a coordinate system from a datum and projection.
 
Method Summary
 CoordinatePoint convertToLatLong(CoordinatePoint point)
          Convert a point to latitude/longitude.
 CoordinatePoint convertToLatLongWGS84(CoordinatePoint point)
          Convert a point to latitude/longitude and WGS84.
static MRCoordinateSystem getCS(String datum, String projection)
          Get a coordinate system from a datum and projection.
 MRDatum getDatum()
          Get the datum for this coordinate system.
 CoordinateSystem getGeotoolsCS()
          Get the CoordinateSystem object for this coordinate system.
 MRProjection getProjection()
          Get the projection for this coordinate system.
 boolean isKnownCoordinateSystem()
          Check if this is a "known" coordinate system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REALM_OZI_EXPLORER

public static String REALM_OZI_EXPLORER
Realm to represent OziExplorer common names.


REALM_OZI_EXPLORER_CODE

public static String REALM_OZI_EXPLORER_CODE
Realm to represent OziExplorer codes.


REALM_OZI_EXPLORER_PROJECTION_PARAMS

public static String REALM_OZI_EXPLORER_PROJECTION_PARAMS
Realm to represent OziExplorer map projection parameters.


REALM_OZI_EXPLORER_UNIT_MULTIPLIER

public static String REALM_OZI_EXPLORER_UNIT_MULTIPLIER
Realm to represent OziExplorer unit multiplier


REALM_OZI_EXPLORER_USE_LATLONG_FOR_GRID

public static String REALM_OZI_EXPLORER_USE_LATLONG_FOR_GRID
Realm to tell OziExplorer to output grid coordinates as lat/long

Constructor Detail

MRCoordinateSystem

public MRCoordinateSystem(MRDatum datum,
                          MRProjection projection)
Construct a coordinate system from a datum and projection. If both the datum and projection supply a valid WKT then this coordinate system will be considered to be "known".

Parameters:
datum - The datum.
projection - The projection.
See Also:
isKnownCoordinateSystem()
Method Detail

getDatum

public MRDatum getDatum()
Get the datum for this coordinate system.


getProjection

public MRProjection getProjection()
Get the projection for this coordinate system.


getGeotoolsCS

public CoordinateSystem getGeotoolsCS()
Get the CoordinateSystem object for this coordinate system.

Returns:
Returns the CoordinateSystem object, or null if this is not a recognised coordinate system.

getCS

public static MRCoordinateSystem getCS(String datum,
                                       String projection)
Get a coordinate system from a datum and projection.

Parameters:
datum - The well known name of a datum.
projection - The well known name of a projection.

convertToLatLongWGS84

public CoordinatePoint convertToLatLongWGS84(CoordinatePoint point)
Convert a point to latitude/longitude and WGS84.

Parameters:
point - A point that uses the coordinate system of this object.
Returns:
Returns a point at the same location as the supplied point, but expressed using the WGS84 datum and latitude/longitude projeciton.

convertToLatLong

public CoordinatePoint convertToLatLong(CoordinatePoint point)
Convert a point to latitude/longitude.

Parameters:
point - A point that uses the coordinate system of this object.
Returns:
Returns a point at the same location as the supplied point, but expressed using latitude/longitude projeciton.

isKnownCoordinateSystem

public boolean isKnownCoordinateSystem()
Check if this is a "known" coordinate system. A coordinate system is considered to be known if both its datum and projection components return valid WKT. Mathematical operations cannot be performed on a coordinate system that is not known.

Returns:
Returns true if this coordinate system is known, or false if not.