org.deegree.crs.configuration
Class PROJ4CRSProvider
java.lang.Object
org.deegree.crs.configuration.PROJ4CRSProvider
- All Implemented Interfaces:
- CRSProvider
public class PROJ4CRSProvider
- extends Object
- implements CRSProvider
The PROJ4CRSProvider
class is capable of parsing the nad/epsg file and use it as a backend for crs's.
This class also adds following identifiers to the coordinatesystems.
- http://www.opengis.net/gml/srs/epsg.xml#4326
- URN:OPENGIS:DEF:CRS:EPSG::
- URN:OGC:DEF:CRS:EPSG::
- Version:
- $Revision:$, $Date:$
- Author:
- Rutger Bezema, last edited by: $Author:$
Constructor Summary |
PROJ4CRSProvider()
Export constructor, sets the version to current date.. |
PROJ4CRSProvider(File f)
Opens a reader on the file and parses all parameters with id, without instantiating any CoordinateSystems. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
idToParams
Map<String,Map<String,String>> idToParams
coordinateSystems
Map<String,CoordinateSystem> coordinateSystems
PROJ4CRSProvider
public PROJ4CRSProvider()
- Export constructor, sets the version to current date..
PROJ4CRSProvider
public PROJ4CRSProvider(File f)
- Opens a reader on the file and parses all parameters with id, without instantiating any CoordinateSystems.
- Parameters:
f
- the file to open.
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.
canExport
public boolean canExport()
- Specified by:
canExport
in interface CRSProvider
- Returns:
- true if this provider can export a given crs.
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()
getCRSByID
public CoordinateSystem getCRSByID(String id)
throws CRSConfigurationException
- Specified by:
getCRSByID
in interface CRSProvider
- 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.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net