Difference between revisions of "Coordinate Transformation Service"

From OpenJUMP Wiki
Jump to navigation Jump to search
(Created page with '<Big>'''What a Coordinate Reference System is ?'''</Big> Coordinate Reference Systems are of 3 main sorts : - Cartesian (not much used except by geodesian and during transformat…')
 
Line 1: Line 1:
 
<Big>'''What a Coordinate Reference System is ?'''</Big>
 
<Big>'''What a Coordinate Reference System is ?'''</Big>
  
Coordinate Reference Systems are of 3 main sorts :
+
A Coordinate Reference System is a coordinate system that enables every location on the Earth to be specified by a set of numbers
- Cartesian (not much used except by geodesian and during transformation processes)
+
It can be of 3 main sorts :
- Geographic (longitude, latitude, and sometimes elevation or height above ellipsoid)
+
* Cartesian (not much used except by geodesian and during transformation processes)
- Projected (used for cartographic purposes, there are dozens of possible projection)
+
* Geographic (longitude, latitude, and sometimes elevation or height above ellipsoid)
 +
* Projected (used for cartographic purposes, there are dozens of possible projection)
  
Coordinate Reference System are mainly defined by
+
'''Coordinate Reference System are defined by'''
- A Datum (WGS84, ETRS, ED50...) : mandatory for any CRS
+
* A Datum (WGS84, ETRS, ED50...) : mandatory for any CRS
- An Ellipsoid : mandatory for Geographic and Projected CRS
+
* An Ellipsoid and a Prime Meridian : mandatory for Geographic and Projected CRS
- A Prime Meridian : mandatory for Geographic and Projected CRS  
+
* A Projection : mandatory for Projected CRS
- A projection : mandatory for Projected CRS
 
  
There is a well established CRS database called EPSG, including definition of hundreds of CRS.
+
There is a well established CRS registry called [http://www.epsg-registry.org/ EPSG], including definitions of hundreds of CRS.
  
<Big>'''Coordinate Transformation Service'''</Big>
+
Most widely used formats to describe CRS are :
 +
* [http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/doc-files/WKT.html WKT (Well Known Text)] : there is a format specified by OGC and several variants (like ESRI proj files) introducing compatibility problems.
 +
* proj text file used by the Proj4 library where each CRS is defined on a single line
 +
* EPSG database (using access, hsqldb or h2 database)
 +
 
 +
 
 +
<Big>'''Coordinate Transformation Service library in non java language'''</Big>
 +
 
 +
There is popular and mature CRS transformation tool called [http://trac.osgeo.org/proj/ Proj4 ] which is used by
 +
* PostGIS (spatial database)
 +
* ogr2ogr, based on the [http://www.gdal.org/ogr/ OGR] library (a popular command line tool able to change coordinates and/or data format of a dataset)
  
There is popular and mature CRS transformation tool called [Proj4 http://trac.osgeo.org/proj/] which is used by
 
- PostGIS (spatial database)
 
- OGR2OGR (a popular command line tool able to change coordinates and/or data format of a dataset)
 
  
 
<Big>'''Coordinate Transformation Service in/from Java'''</Big>   
 
<Big>'''Coordinate Transformation Service in/from Java'''</Big>   
  
'''GeoAPI'''
+
'''[http://www.opengeospatial.org/standards/geoapi GeoAPI]'''
 +
 
 
It is a library including java interfaces conforming OGC Standards for Coordinate Transformation Service and some other topics.
 
It is a library including java interfaces conforming OGC Standards for Coordinate Transformation Service and some other topics.
 
At the origin, it has been developped to make libraries like OpenJUMP and Geotools interoperable.
 
At the origin, it has been developped to make libraries like OpenJUMP and Geotools interoperable.
 
Today, GeoToolKit is the only java library implementing the GeoAPI, but adapters have been developed for Proj4 to prove GeoAPI can be a general interface for any CTS implementation.  
 
Today, GeoToolKit is the only java library implementing the GeoAPI, but adapters have been developed for Proj4 to prove GeoAPI can be a general interface for any CTS implementation.  
 
   
 
   
 +
 
'''GeoTools and GeoToolKit'''
 
'''GeoTools and GeoToolKit'''
GeoTools has developped a pure java Coordinate Transformation Service. It has been a GeoAPI implementation for a long time, but it is no more.
 
Ede has developped a [OpenJUMP PlugIn] which makes GeoTools CTS accessible from OpenJUMP. It is based on a quite old version of GeoTools.
 
GeoToolKit is a fork of GeoTools. GeoToolKit is still a strict implementation of GeoAPI.
 
JhLabs has ported Proj4 code into Java. It is not a complete implementation of GeoAPI and has much less classes than GeoTools or GeoToolKit. It is available from two places :
 
- As Proj4J, on tutsiat website, the site of M. Davis who is maintaining the code
 
- As JMapProjLib, on sourceforge, maintained by B. Jenny
 
  
'''IGOR'''
+
* [http://www.geotools.org/ GeoTools] has developped a pure java Coordinate Transformation Service. It has been a GeoAPI implementation for a long time, but it is no more.
ISA has developped a thin wrapper making OGR2OGR available from java (and from SkyJUMP).
+
* Ede has developped [[CTS Extension]] for OpenJUMP which makes GeoTools CTS accessible from OpenJUMP. It is based on a quite old version of GeoTools.
It is Mainly a java UI calling OGR2OGR.exe
+
* [http://www.geotoolkit.org/ GeoToolKit] is a fork of GeoTools. GeoToolKit is still a strict implementation of GeoAPI.
SkyJUMP com/isa/jump/plugin/igor package contains 4 classes which may be able to port IGOR to OpenJUMP quite easily.
+
 
 +
 
 +
'''Port of Proj4 library into Java'''
 +
 
 +
[http://www.jhlabs.com/java/maps/proj/index.html JhLabs] has ported Proj4 code into Java. It is not a complete implementation of GeoAPI and has much less classes than GeoTools or GeoToolKit. It is available from two places :
 +
* As [http://trac.osgeo.org/proj4j/ Proj4J], hosted by OsGEO  and maintained by M. Davis
 +
* As [https://sourceforge.net/projects/jmapprojlib/ JMapProjLib], on sourceforge, maintained by B. Jenny
 +
 
 +
 
 +
'''[https://sourceforge.net/projects/ogr-igor/ iGOR]'''
 +
 
 +
ISA has developped a thin wrapper making ogr2ogr available from java (and from SkyJUMP).
 +
It is Mainly a java UI calling ogr2ogr.exe
 +
SkyJUMP com/isa/jump/plugin/igor package contains [http://skyjump.cvs.sourceforge.net/viewvc/skyjump/skyjump/com/isa/jump/plugin/igor/ 4 classes] which may be able to port IGOR to OpenJUMP quite easily.
 +
 
 +
 
 +
'''CTS'''
  
''CTS'''
+
I (Michaël) developped a CTS library which is an on-going work and which lies somewhere between Proj4J and GeoTools.
 +
Source code is available on [http://trac.orbisgis.org/t/wiki/devs/cts OrbisGIS] web site.
 +
I used an old version of this library to create [http://michael.michaud.free.fr/geodesie/JTransfoCoord.html JTransfoCoord], and I've refactored it several times since then.
 +
My goals would be to achieve it and to implement GeoAPI, but I have no deadline and only sparse time to do it ;-)

Revision as of 16:13, 29 October 2011

What a Coordinate Reference System is ?

A Coordinate Reference System is a coordinate system that enables every location on the Earth to be specified by a set of numbers It can be of 3 main sorts :

  • Cartesian (not much used except by geodesian and during transformation processes)
  • Geographic (longitude, latitude, and sometimes elevation or height above ellipsoid)
  • Projected (used for cartographic purposes, there are dozens of possible projection)

Coordinate Reference System are defined by

  • A Datum (WGS84, ETRS, ED50...) : mandatory for any CRS
  • An Ellipsoid and a Prime Meridian : mandatory for Geographic and Projected CRS
  • A Projection : mandatory for Projected CRS

There is a well established CRS registry called EPSG, including definitions of hundreds of CRS.

Most widely used formats to describe CRS are :

  • WKT (Well Known Text) : there is a format specified by OGC and several variants (like ESRI proj files) introducing compatibility problems.
  • proj text file used by the Proj4 library where each CRS is defined on a single line
  • EPSG database (using access, hsqldb or h2 database)


Coordinate Transformation Service library in non java language

There is popular and mature CRS transformation tool called Proj4 which is used by

  • PostGIS (spatial database)
  • ogr2ogr, based on the OGR library (a popular command line tool able to change coordinates and/or data format of a dataset)


Coordinate Transformation Service in/from Java

GeoAPI

It is a library including java interfaces conforming OGC Standards for Coordinate Transformation Service and some other topics. At the origin, it has been developped to make libraries like OpenJUMP and Geotools interoperable. Today, GeoToolKit is the only java library implementing the GeoAPI, but adapters have been developed for Proj4 to prove GeoAPI can be a general interface for any CTS implementation.


GeoTools and GeoToolKit

  • GeoTools has developped a pure java Coordinate Transformation Service. It has been a GeoAPI implementation for a long time, but it is no more.
  • Ede has developped CTS Extension for OpenJUMP which makes GeoTools CTS accessible from OpenJUMP. It is based on a quite old version of GeoTools.
  • GeoToolKit is a fork of GeoTools. GeoToolKit is still a strict implementation of GeoAPI.


Port of Proj4 library into Java

JhLabs has ported Proj4 code into Java. It is not a complete implementation of GeoAPI and has much less classes than GeoTools or GeoToolKit. It is available from two places :

  • As Proj4J, hosted by OsGEO and maintained by M. Davis
  • As JMapProjLib, on sourceforge, maintained by B. Jenny


iGOR

ISA has developped a thin wrapper making ogr2ogr available from java (and from SkyJUMP). It is Mainly a java UI calling ogr2ogr.exe SkyJUMP com/isa/jump/plugin/igor package contains 4 classes which may be able to port IGOR to OpenJUMP quite easily.


CTS

I (Michaël) developped a CTS library which is an on-going work and which lies somewhere between Proj4J and GeoTools. Source code is available on OrbisGIS web site. I used an old version of this library to create JTransfoCoord, and I've refactored it several times since then. My goals would be to achieve it and to implement GeoAPI, but I have no deadline and only sparse time to do it ;-)