deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.crs.configuration
Class DeegreeCRSProvider

java.lang.Object
  extended by org.deegree.crs.configuration.DeegreeCRSProvider
All Implemented Interfaces:
CRSProvider

public class DeegreeCRSProvider
extends Object
implements CRSProvider

The DeegreeCRSProvider reads the deegree crs-config (based on it's own xml-schema) and creates the CRS's (and their datums, conversion info's, ellipsoids and projections) if requested.

Attention, although urn's are case-sensitive, the deegreeCRSProvider is not. All incoming id's are toLowerCased!

Version:
$Revision:$, $Date:$
Author:
Rutger Bezema, last edited by: $Author:$

Constructor Summary
DeegreeCRSProvider()
          Empty constructor may only be used for exporting, other usage will result in undefined behavior.
DeegreeCRSProvider(File f)
           
 
Method Summary
 boolean canExport()
           
 void export(StringBuilder sb, List<CoordinateSystem> crsToExport)
          Exports the crs to the implemented format.
 List<CoordinateSystem> getAvailableCRSs()
           
 CoordinateSystem getCRSByID(String crsId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeegreeCRSProvider

public DeegreeCRSProvider()
Empty constructor may only be used for exporting, other usage will result in undefined behavior.


DeegreeCRSProvider

public DeegreeCRSProvider(File f)
                   throws CRSConfigurationException
Parameters:
f - to load coordinate system definitions from if null, the standard configuration file will be used, by searching '/' first and if unsuccessful in org.deegree.crs.configuration.
Throws:
CRSConfigurationException - if the give file or the default-crs-configuration.xml file could not be loaded.
Method Detail

canExport

public boolean canExport()
Specified by:
canExport in interface CRSProvider
Returns:
true if this provider can export a given crs.

getCRSByID

public CoordinateSystem getCRSByID(String crsId)
                            throws CRSConfigurationException
Specified by:
getCRSByID in interface CRSProvider
Parameters:
crsId - 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.

export

public void export(StringBuilder sb,
                   List<CoordinateSystem> crsToExport)
Description copied from interface: CRSProvider
Exports the crs to the implemented format. Try calling CRSProvider.canExport() before executing this method.

Specified by:
export in interface CRSProvider
Parameters:
sb - the StringBuilder which will contain the exported version of the given crs.
crsToExport - the CoordinateSystems to export.
See Also:
CRSProvider.canExport()

getAvailableCRSs

public List<CoordinateSystem> getAvailableCRSs()
                                        throws CRSConfigurationException
Specified by:
getAvailableCRSs in interface CRSProvider
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 this an empty List ( a list with size == 0 ) should be returned.

deegree 2.2 (2008/12/22 11:33 build-3038-official)

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