deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.crs
Class CRSRegistry

java.lang.Object
  extended by org.deegree.crs.CRSRegistry

public class CRSRegistry
extends Object

The CRSRegistry class wraps the access to the CRSProvider in the org.deegree.crs package by supplying a static create method, thus encapsulating the access to the CoordinateSystems.

Version:
$Revision: 22643 $, $Date: 2010-02-19 11:37:08 +0100 (Fr, 19 Feb 2010) $
Author:
Rutger Bezema, last edited by: $Author: rbezema $

Constructor Summary
CRSRegistry()
           
 
Method Summary
static Transformation getTransformation(String providerName, CoordinateSystem sourceCRS, CoordinateSystem targetCRS)
          Retrieve a Transformation (chain) which transforms coordinates from the given source into the given target crs.
static Transformation getTransformation(String providerName, String id)
          Get a Transformation with given id, or null if it does not exist.
static CoordinateSystem lookup(CoordinateSystem realCRS)
          Wrapper for the private constructor of the org.deegree.crs class.
static CoordinateSystem lookup(CRSCodeType name)
          Get a real coordinate system from the default provider.
static CoordinateSystem lookup(String name)
          Creates a CRS from the given name, if no CRS was found an UnkownCRSException will be thrown.
static CoordinateSystem lookup(String providerName, CRSCodeType name)
          Get a 'real' coordinatesystem from the backend.
static CoordinateSystem lookup(String providerName, String name)
          Creates a CRS from the given name using the given provider, if no CRS was found an UnkownCRSException will be thrown.
static CoordinateSystem lookupDummyCRS(String name)
          Wrapper for the private constructor to create a dummy projected crs with no projection parameters set, the standard wgs84 datum and the given optional name as the identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRSRegistry

public CRSRegistry()
Method Detail

lookup

public static CoordinateSystem lookup(String providerName,
                                      String name)
                               throws UnknownCRSException
Creates a CRS from the given name using the given provider, if no CRS was found an UnkownCRSException will be thrown.

Parameters:
providerName - to be used for the creation of the crs.
name - of the crs, e.g. EPSG:31466
Returns:
a CoordinateSystem corresponding to the given name
Throws:
UnknownCRSException - if the crs-name is not known

lookup

public static CoordinateSystem lookup(String providerName,
                                      CRSCodeType name)
                               throws UnknownCRSException
Get a 'real' coordinatesystem from the backend.

Parameters:
providerName -
name -
Returns:
a real coordinate system not just a wrapper.
Throws:
UnknownCRSException

getTransformation

public static Transformation getTransformation(String providerName,
                                               String id)
Get a Transformation with given id, or null if it does not exist.

Parameters:
providerName - to use.
id - of the Transformation.
Returns:
the identified transformation or null if no such transformation is found.

getTransformation

public static Transformation getTransformation(String providerName,
                                               CoordinateSystem sourceCRS,
                                               CoordinateSystem targetCRS)
                                        throws IllegalArgumentException,
                                               TransformationException
Retrieve a Transformation (chain) which transforms coordinates from the given source into the given target crs. If no such Transformation could be found or the implementation does not support inverse lookup of transformations null will be returned.

Parameters:
providerName - to use.
sourceCRS - start of the transformation (chain)
targetCRS - end point of the transformation (chain).
Returns:
the given Transformation or null if no such transformation was found.
Throws:
TransformationException
IllegalArgumentException

lookup

public static CoordinateSystem lookup(String name)
                               throws UnknownCRSException
Creates a CRS from the given name, if no CRS was found an UnkownCRSException will be thrown.

Parameters:
name - of the crs, e.g. EPSG:4326
Returns:
a CoordinateSystem corresponding to the given name, using the configured provider.
Throws:
UnknownCRSException - if the crs-name is not known

lookup

public static CoordinateSystem lookup(CRSCodeType name)
                               throws UnknownCRSException
Get a real coordinate system from the default provider.

Parameters:
name -
Returns:
a real coordinate system looked up in the default provider.
Throws:
UnknownCRSException

lookup

public static CoordinateSystem lookup(CoordinateSystem realCRS)
Wrapper for the private constructor of the org.deegree.crs class.

Parameters:
realCRS - to wrap
Returns:
a CRSDeliverable corresponding to the given crs.

lookupDummyCRS

public static CoordinateSystem lookupDummyCRS(String name)
Wrapper for the private constructor to create a dummy projected crs with no projection parameters set, the standard wgs84 datum and the given optional name as the identifier. X-Y axis are in metres.

Parameters:
name - optional identifier, if missing, the word 'dummy' will be used.
Returns:
a dummy CoordinateSystem having filled out all the essential values.

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>