org.deegree.cs.persistence.deegree.d3
Interface CRSParser<T>

Type Parameters:
T -
All Superinterfaces:
CRSResource<T>, XLinkResolver<T>

public interface CRSParser<T>
extends CRSResource<T>

The base interface for deegree (2 & 3) configurations.

Version:
$Revision: 29642 $, $Date: 2011-02-11 13:59:33 +0100 (Fri, 11 Feb 2011) $
Author:
Rutger Bezema, last edited by: $Author: lbuesching $

Method Summary
 List<CRSCodeType[]> getAvailableCRSCodes()
           
 IEllipsoid getEllipsoidForId(String ellipsoidID)
          Tries to find a cached ellipsoid, if not found, the config will be checked.
 IGeodeticDatum getGeodeticDatumForId(String datumID)
           
 IPrimeMeridian getPrimeMeridianForId(String meridianID)
           
 IProjection getProjectionForId(String projectionId, GeographicCRS underlyingCRS)
           
 String getVersion()
           
 ICRS parseCoordinateSystem(T crsDefintion)
           
 CRSResource parseIdentifiableObject(String id)
          Gets the Element for the given id and heuristically check the localname of the resulting root Element.
 Transformation parseTransformation(T transformationDefinition)
          Retrieves a transformation from the resource.
 
Methods inherited from interface org.deegree.cs.configuration.resources.CRSResource
getTransformation, getWGS84Transformation
 
Methods inherited from interface org.deegree.cs.configuration.resources.XLinkResolver
getURIAsType
 

Method Detail

parseCoordinateSystem

ICRS parseCoordinateSystem(T crsDefintion)
                           throws CRSConfigurationException
Parameters:
crsDefintion - to be parsed
Returns:
an instance of the given crs or null if the crsDefinition is null or could not be mapped to a valid type.
Throws:
CRSConfigurationException - if something went wrong while constructing the crs.

getVersion

String getVersion()
                  throws CRSConfigurationException
Returns:
the version of the root element of the empty string if no version attribute was found in the root element.
Throws:
CRSConfigurationException - if the root element is empty

parseTransformation

Transformation parseTransformation(T transformationDefinition)
Retrieves a transformation from the resource.

Parameters:
transformationDefinition -
Returns:
the parsed transformation or null if no transformation could be parsed.

getGeodeticDatumForId

IGeodeticDatum getGeodeticDatumForId(String datumID)
                                     throws CRSConfigurationException
Parameters:
datumID -
Returns:
the
Throws:
CRSConfigurationException

getPrimeMeridianForId

IPrimeMeridian getPrimeMeridianForId(String meridianID)
                                     throws CRSConfigurationException
Parameters:
meridianID - the id to search for.
Returns:
the primeMeridian with given id or null
Throws:
CRSConfigurationException - if the longitude was not set or the units could not be parsed.

getEllipsoidForId

IEllipsoid getEllipsoidForId(String ellipsoidID)
                             throws CRSConfigurationException
Tries to find a cached ellipsoid, if not found, the config will be checked.

Parameters:
ellipsoidID -
Returns:
an ellipsoid or null if no ellipsoid with given id was found, or the id was null or empty.
Throws:
CRSConfigurationException - if something went wrong.

parseIdentifiableObject

CRSResource parseIdentifiableObject(String id)
Gets the Element for the given id and heuristically check the localname of the resulting root Element. This version supports following local names (see schema):
  • ellipsoid
  • geodeticDatum
  • projectedCRS
  • geographicCRS
  • compoundCRS
  • geocentricCRS
  • primeMeridian
  • wgs84Transformation

Parameters:
id - to look for.
Returns:
the instantiated CRSIdentifiable or null if it could not be parsed.

getAvailableCRSCodes

List<CRSCodeType[]> getAvailableCRSCodes()
                                         throws CRSConfigurationException
Returns:
all available codetypes, each sole array should reference the ids of one single crs.
Throws:
CRSConfigurationException

getProjectionForId

IProjection getProjectionForId(String projectionId,
                               GeographicCRS underlyingCRS)
Parameters:
projectionId - of the projection
underlyingCRS - of the projection
Returns:
the projection denoted by the given id, or null if no such projection could be loaded.


Copyright © 2011. All Rights Reserved.