deegree 2.5 (2011/06/29 09:44 build-8-official)

Package org.deegree.crs.configuration

The org.deegree.crs.configuraton package contains the classes necessary to read crs-definitions from a file.

See:
          Description

Interface Summary
CRSProvider The CRSProvider will allow the support for different crs-definitions formats within the crs package.
 

Class Summary
AbstractCRSProvider<T> add class documentation here.
CRSConfiguration The CRSConfiguration creates, instantiates and supplies a configured CRS-Provider.
 

Enum Summary
AbstractCRSProvider.SupportedProjectionParameters The SupportedProjectionParameters enumeration defines currently supported projection parameters
AbstractCRSProvider.SupportedProjections The SupportedProjections enumeration defines currently supported projections
AbstractCRSProvider.SupportedTransformationParameters The SupportedTransformationParameters enumeration defines currently supported transformation parameters
AbstractCRSProvider.SupportedTransformations The SupportedTransformations enumeration defines currently supported transformations
 

Package org.deegree.crs.configuration Description

The org.deegree.crs.configuraton package contains the classes necessary to read crs-definitions from a file.

For this purpose the CRSProvider interface is created. It allows the CRSConfiguration to rely on a wide variety of different 'crs-definitions-formats' for example deegree-crs, wkt (not implemented yet), proj4 or gml (not implementedj yet). The good thing is, the interface defines an export method, which can be called with a crs to receive a crs-definitions for the implementing interface, thus allowing to create an arbitrary configuration swift between the implementations.

The default crs configuration can be changed by editing the org.deegree.crs.configuration.crs_providers.properties file, the default provider is DeegreeCRSProvider.

Automatic loading of projection/transformation classes

It is possible to create your own projection/transformation classes, which the default provider will load automatically.

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'>

Because the loading is done with reflections your classes must sustain following criteria:

Projections

  1. It must be a sub class of Projection
  2. A constructor with following signature must be supplied:
    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.

Transformations

  1. It must be a sub class of PolynomialTransformation
  2. A constructor with following signature must be supplied:
    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.

Author:
Rutger Bezema, last edited by: $Author: rbezema $ @version $Revision: 15008 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mrz 2007)$

deegree 2.5 (2011/06/29 09:44 build-8-official)

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