org.deegree.cs.persistence
Interface CRSStore

All Known Implementing Classes:
AbstractCRSStore, DBCRSStore, DeegreeCRSStore, GMLCRSStore, PROJ4CRSStore

public interface CRSStore

Base interface for all

Version:
$Revision: $, $Date: $
Author:
Lyn Buesching, last edited by: $Author: lyn $

Method Summary
 List<CRSCodeType[]> getAvailableCRSCodes()
          This method should be called if one is only interested in the available identifiers and not in the coordinatesystems themselves.
 List<ICRS> getAvailableCRSs()
          This method should be called to see if the provider is able to create all defined crs's, thus verifying the correctness of the configuration.
 ICRS getCRSByCode(CRSCodeType id)
           
 ICRS getCRSByCode(CRSCodeType id, boolean forceXY)
           
 CRSResource getCRSResource(CRSCodeType id)
          This method is more general than the getCRSByCode(CRSCodeType), because it represents a possibility to return an arbitrary CRSResource Object from the providers backend.
 Transformation getDirectTransformation(ICRS sourceCRS, ICRS targetCRS)
          This method is should retrieve a transformation which transforms coordinates from the given source into the given target crs.
 Transformation getDirectTransformation(String id)
          This method should retrieve a transformation with the given id.
 TransformationFactory.DSTransform getPreferedTransformationType()
           
 void init()
          Called by the manager to indicate that this CRSStore instance is being registered.
 

Method Detail

init

void init()
Called by the manager to indicate that this CRSStore instance is being registered.


getDirectTransformation

Transformation getDirectTransformation(ICRS sourceCRS,
                                       ICRS targetCRS)
                                       throws CRSConfigurationException
This method is should retrieve a transformation 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 should be returned.

Parameters:
sourceCRS - start of the transformation (chain)
targetCRS - end point of the transformation (chain).
Returns:
the Transformation Object or null if no such Object was found.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested Object. This exception should not be thrown no Transformation was found, in this case null should be returned.

getDirectTransformation

Transformation getDirectTransformation(String id)
                                       throws CRSConfigurationException
This method should retrieve a transformation with the given id. If a transformation with the given id could not be found null should be returned.

Parameters:
id - the id of the transformation
Returns:
the Transformation Object or null if no such Object was found.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested Object. This exception should not be thrown no Transformation was found, in this case null should be returned.

getCRSResource

CRSResource getCRSResource(CRSCodeType id)
                           throws CRSConfigurationException
This method is more general than the getCRSByCode(CRSCodeType), because it represents a possibility to return an arbitrary CRSResource Object from the providers backend.

Parameters:
id - string representation of the resource to retrieve
Returns:
the CRSResource Object or null if no such Object was found.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested Object. This exception should not be thrown if the given id wasn't found, in this case null should be returned.

getCRSByCode

ICRS getCRSByCode(CRSCodeType id)
                  throws CRSConfigurationException
Parameters:
id - string representation of the CoordinateSystem
Returns:
the identified CRS or null if no such CRS was found.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested crs. This exception should not be thrown if the given id wasn't found, in this case null should be returned.

getCRSByCode

ICRS getCRSByCode(CRSCodeType id,
                  boolean forceXY)
                  throws CRSConfigurationException
Parameters:
id - string representation of the CoordinateSystem
forceXY - true if the axis order of the coordinate system should be x/y (EAST/NORTH; WEST/SOUTH); false if the defined axis order should be used
Returns:
the identified CRS or null if no such CRS was found.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested crs. This exception should not be thrown if the given id wasn't found, in this case null should be returned.

getAvailableCRSs

List<ICRS> getAvailableCRSs()
                            throws CRSConfigurationException
This method should be called to see if the provider is able to create all defined crs's, thus verifying the correctness of the configuration.

Returns:
all configured CRSs.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested crs. This exception should not be thrown if no CoordinateSystems were found, in the latter case an empty List ( a list with size == 0 ) should be returned.

getAvailableCRSCodes

List<CRSCodeType[]> getAvailableCRSCodes()
                                         throws CRSConfigurationException
This method should be called if one is only interested in the available identifiers and not in the coordinatesystems themselves.

Returns:
the identifiers of all configured CRSs.
Throws:
CRSConfigurationException - if the implementation was confronted by an exception and could not deliver the requested crs. This exception should not be thrown if no CoordinateSystems were found, in the latter case an empty List ( a list with size == 0 ) should be returned.

getPreferedTransformationType

TransformationFactory.DSTransform getPreferedTransformationType()
Returns:
the prefered transformation type for this CRSStore


Copyright © 2011. All Rights Reserved.