|
deegree 2.4 (2010/11/11 10:47 build-27-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.crs.configuration.AbstractCRSProvider<Element>
org.deegree.crs.configuration.deegree.DeegreeCRSProvider
public class DeegreeCRSProvider
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!
You can achieve this loading by supplying the class attribute to a
crs:projectedCRS/crs:projection or crs:coordinateSystem/crs:transformation element in
the 'deegree-crs-configuration.xml'. This attribute must contain the full class name (with package), e.g.
<crs:projection class='my.package.and.projection.Implementation'>
Projection
public MyProjection(
GeographicCRS underlyingCRS,
double falseNorthing,
double falseEasting,
javax.vecmath.Point2d naturalOrigin,
Unit units,
double scale,
java.util.List<org.w3c.dom.Element> yourProjectionElements
);
The first six parameters are common to all projections (for an explanation of their meaning take a look at
Projection). The last list, will contain all xml-dom elements you supplied in the deegree configuration
(child elements of the crs:projection/crs:MyProjection), thus relieving you of the parsing of the
deegree-crs-configuration.xml document.
PolynomialTransformation
public MyTransformation(
java.util.list<Double> aValues,
java.util.list<Double> bValues,
CoordinateSystem targetCRS,
java.util.List<org.w3c.dom.Element> yourTransformationElements
);
The first three parameters are common to all polynomial values (for an explanation of their meaning take a look at
PolynomialTransformation). Again, the last list, will contain all
xml-dom elements you supplied in the deegree configuration (child elements of the
crs:transformation/crs:MyTransformation), thus relieving you of the parsing of the deegree-crs-configuration.xml
document.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.deegree.crs.configuration.AbstractCRSProvider |
|---|
AbstractCRSProvider.SupportedProjectionParameters, AbstractCRSProvider.SupportedProjections, AbstractCRSProvider.SupportedTransformationParameters, AbstractCRSProvider.SupportedTransformations |
| Constructor Summary | |
|---|---|
DeegreeCRSProvider(Properties properties)
|
|
| Method Summary | |
|---|---|
boolean |
canExport()
|
void |
export(StringBuilder sb,
List<CoordinateSystem> crsToExport)
Exports the crs to the implemented format. |
List<String> |
getAvailableCRSIds()
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. |
Identifiable |
getIdentifiable(String id)
This method is more general than the CRSProvider.getCRSByID(String), because it represents a possibility to return
an arbitrary Identifiable Object from the providers backend. |
CRSParser |
getResolver()
|
List<String[]> |
getSortedAvailableCRSIds()
This method should be called if one is only interested in the available identifiers and not in the coordinatesystems themselves. |
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(Element crsDefinition)
|
Transformation |
parseTransformation(Element transformationDefinition)
|
| Methods inherited from class org.deegree.crs.configuration.AbstractCRSProvider |
|---|
addIdToCache, clearCache, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCachedIdentifiable, getCRSByID, 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 DeegreeCRSProvider(Properties properties)
throws CRSConfigurationException
properties - containing information about the crs resource class and the file location of the crs configuration. If
either is null the default mechanism is using the CRSParser and the
deegree-crs-configuration.xml
CRSConfigurationException - if the give file or the default-crs-configuration.xml file could not be loaded.| Method Detail |
|---|
public boolean canExport()
public void export(StringBuilder sb,
List<CoordinateSystem> crsToExport)
CRSProviderCRSProvider.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 CRSParser getResolver()
getResolver in class AbstractCRSProvider<Element>
public List<String[]> getSortedAvailableCRSIds()
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 List<String> getAvailableCRSIds()
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 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 Identifiable getIdentifiable(String id)
throws CRSConfigurationException
CRSProviderCRSProvider.getCRSByID(String), because it represents a possibility to return
an arbitrary Identifiable Object from the providers backend.
id - string representation of the resource to retrieve
Identifiable 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(Element crsDefinition)
throws CRSConfigurationException
parseCoordinateSystem in class AbstractCRSProvider<Element>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 crsDefintion
public Transformation parseTransformation(Element transformationDefinition)
throws CRSConfigurationException
parseTransformation in class AbstractCRSProvider<Element>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 crsDefintion
public Transformation getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
throws CRSConfigurationException
CRSProvidernull 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 2.4 (2010/11/11 10:47 build-27-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org