|
From: Martin D. <mar...@te...> - 2004-06-13 17:54:50
|
The new CRS API (org.geotools.referencing) now has a working
MathTransformFactory. MathTransforms in the new API are very similar to
the old API. The most significant change is in the way math transforms
are registered (i.e. MathTransformProvider). The list of available math
transforms is no-longer hard-coded. Instead, it is now provided in the
following file:
META-INF/services/org.geotools.referencing.operation.MathTransformProvider
If a new JAR file is dropped in the classpath with such META-INF
informations, all MathTransform declared in it will be automatically
recognized by MathTransformFactory.
Currently ported MathTransforms are:
- "Affine"
- "Logarithmic"
- "Exponential"
- "Geocentric_To_Ellipsoid"
- "Ellipsoid_To_Geocentric"
as well as the following operations on MathTransform:
- concatenate
- pass through
An other difference (compared to the old API) is that transform are now
identified using an OpenGIS's Identifier interface rather than a plain
string. Concequently, it is possible to use many identifier for the same
transform. For example, the Geocentric to Ellipsoid transform is
currently declared with 2 identifiers:
new Identifier(Citation.OPEN_GIS, "Geocentric_To_Ellipsoid"),
new Identifier(Citation.EPSG, "9602")
This means that, when creating a MathTransform, the two following lines
are synonymous:
factory.createParameterizedTransform("Geocentric_To_Ellipsoid", ...)
factory.createParameterizedTransform("EPSG:9602", ...)
This thing was not possible in the old API.
Last note: the WKT parser has not yet been fully ported. This is means
that we can't run test script on new MathTransform yet. Concequently, we
are not yet ready to port Rueben's work (Molodenski Transform, etc.). I
will sent a note when the port of WKT parser will be finished.
Martin.
|