|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.crs.configuration.AbstractCRSProvider<Map<String,String>> org.deegree.crs.configuration.proj4.PROJ4CRSProvider
public class PROJ4CRSProvider
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deegree.crs.configuration.AbstractCRSProvider |
---|
AbstractCRSProvider.SupportedProjectionParameters, AbstractCRSProvider.SupportedProjections, AbstractCRSProvider.SupportedTransformationParameters, AbstractCRSProvider.SupportedTransformations |
Constructor Summary | |
---|---|
PROJ4CRSProvider()
Export constructor, sets the version to current date.. |
|
PROJ4CRSProvider(Properties properties)
Opens a reader on the file and parses all parameters with id, without instantiating any CoordinateSystems. |
Method Summary | |
---|---|
boolean |
canExport()
|
void |
export(StringBuilder sb,
List<CoordinateSystem> crsToExport)
Exports the crs to the implemented format. |
List<CRSCodeType> |
getAvailableCRSCodes()
This method should be called if one is only interested in the available identifiers and not in the coordinatesystems themselves. |
List<CoordinateSystem> |
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. |
CRSIdentifiable |
getIdentifiable(CRSCodeType code)
This method is more general than the CRSProvider.getCRSByCode(CRSCodeType) , because it represents a possibility to
return an arbitrary CRSIdentifiable Object from the providers backend. |
protected ProjFileResource |
getResolver()
|
Transformation |
getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
This method is should retrieve a transformation (chain) which transforms coordinates from the given source into the given target crs. |
protected CoordinateSystem |
parseCoordinateSystem(Map<String,String> crsDefinition)
|
Transformation |
parseTransformation(Map<String,String> transformationDefinition)
|
Methods inherited from class org.deegree.crs.configuration.AbstractCRSProvider |
---|
addIdToCache, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCRSByCode, mapProjectionParameters, mapProjections, mapTransformation, mapTransformationParameters, setResolver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PROJ4CRSProvider()
public PROJ4CRSProvider(Properties properties)
properties
- containing a crs.configuration property referencing a file location.Method Detail |
---|
protected ProjFileResource getResolver()
getResolver
in class AbstractCRSProvider<Map<String,String>>
public List<CoordinateSystem> getAvailableCRSs() throws CRSConfigurationException
CRSProvider
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.public boolean canExport()
public void export(StringBuilder sb, List<CoordinateSystem> crsToExport)
CRSProvider
CRSProvider.canExport()
before executing this method.
sb
- the StringBuilder which will contain the exported version of the given crs.crsToExport
- the CoordinateSystems to export.CRSProvider.canExport()
public List<CRSCodeType> getAvailableCRSCodes() throws CRSConfigurationException
CRSProvider
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.public CRSIdentifiable getIdentifiable(CRSCodeType code) throws CRSConfigurationException
CRSProvider
CRSProvider.getCRSByCode(CRSCodeType)
, because it represents a possibility to
return an arbitrary CRSIdentifiable
Object from the providers backend.
code
- string representation of the resource to retrieve
CRSIdentifiable
Object or null
if no such Object was found.
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.protected CoordinateSystem parseCoordinateSystem(Map<String,String> crsDefinition) throws CRSConfigurationException
parseCoordinateSystem
in class AbstractCRSProvider<Map<String,String>>
crsDefinition
- containing the definition of a crs in the understood type.
CoordinateSystem
instance initialized with values from the given type definition fragment or
null
if the given crsDefinition is null
or not known.
CRSConfigurationException
- if an error was found in the given crsDefintionpublic Transformation parseTransformation(Map<String,String> transformationDefinition) throws CRSConfigurationException
parseTransformation
in class AbstractCRSProvider<Map<String,String>>
transformationDefinition
- containing the parameters needed to build a Transformation.
Transformation
instance initialized with values from the given definition or null
if the given transformationDefintion is null
. If the parsed transformation is not supported
or a NotSupportedTransformation
will be returned.
CRSConfigurationException
- if an error was found in the given crsDefintionpublic Transformation getTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS) throws CRSConfigurationException
CRSProvider
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.
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |