Added by jgarnett, last edited by jgarnett on Apr 01, 2008  (view change)

Labels

 
(None)

Contains implementations of Coordinate Reference Systems (CRS), conversion and transformation services.

This module is basically care and feeding for the CoordinateReferenceSystem class - and enough math to make it useful. Before you get too worried it is easy to use (There is a class called CRS that has helper methods for reprojection and stuff).

Before you start - choose only one epsg jar

The referencing module does not do very much out of the box - it needs someone to tell it what all the funny codes mean (such as "EPSG:4326").

You need to choose a single epsg jar to have on your classpath; if you have several epsg jars on your classpath you will get a FactoryException.

For most needs just use the epsg-hsql plugin:

  • EPSG HSQL Plugin: will unpack an hsql database containing the official epsg database into a temp directory, a great solution for desktop applications.

There are several alternatives:

  • EPSG WKT Plugin: uses an internal property file and is lightweight rather than official and correct. A great solution for applets
  • EPSG Postgres Plugin: uses the official epsg database which you have to load into PostgreSQL yourself. A great solution for Java EE applications.
  • EPSG Access Plugin: directly use an the official epsg database as distributed. A great solution for windows users.
  • EPSG Oracle Plugin: currently unsupported

The main module includes definitions of AUTO and AUTO2 and several other OGC inspired ideas.

You are here
<< >>

What Jars do I need?

As an example to use epsg-hsql you will need:

C:\geotools\trunk\modules\plugin\epsg-hsql>mvn dependency:tree
...
------------------------------------------------------------------------
Building EPSG Authority Service using HSQL database
   task-segment: [dependency:tree]
------------------------------------------------------------------------
[dependency:tree]
org.geotools:gt2-epsg-hsql:jar:2.5-SNAPSHOT
+- junit:junit:jar:3.8.1:test
+- javax.media:jai_core:jar:1.1.3:provided
+- org.geotools:gt2-referencing:jar:2.5-SNAPSHOT:compile
|  +- java3d:vecmath:jar:1.3.1:compile
|  +- commons-pool:commons-pool:jar:1.3:compile
|  \- org.geotools:gt2-metadata:jar:2.5-SNAPSHOT:compile
|     +- org.opengis:geoapi:jar:2.2-SNAPSHOT:compile
|     +- javax.units:jsr108:jar:0.01:compile
|     \- edu.oswego:concurrent:jar:1.3.4:compile
+- org.geotools:gt2-sample-data:jar:2.5-SNAPSHOT:test
+- hsqldb:hsqldb:jar:1.8.0.7:compile
+- net.sourceforge.groboutils:groboutils-core:jar:5:test
\- commons-dbcp:commons-dbcp:jar:1.2.2:test
------------------------------------------------------------------------

Limitations

GeoTools performs datum shift using Bursa-Wolf parameters at this time. The rare case of a Datum shift backed by grids are only partially implemented.

Rueben Shulz has implemented data shift backed by grids for NADCON with the following limitations:

  • Use of NADCON grids has not been intergrated with DefaultCoordinateOperationFactory (so you would need to set it up by hand)
  • The general case of a Datum shift provided by a grid is not covered, for example Spanish Datum Changes ED50-ETRS89 will not work

Talk to the module maintainer (Martin Desruisseux) if you have funding for this very important work.