Hello all
SIS command-line can now apply coordinate transformations. This is more
a tools for allowing users to explore SIS capability before to program,
since SIS is more efficiently used from Java code than from that
command-line. For those who want to try, instructions are below.
Note: compared to other map projection packages, Apache SIS has the
following features:
* Stricter compliance to EPSG definitions, especially regarding axis
order.
* Gives an estimation of the coordinate operation accuracy.
* Warn when a coordinate is outside the operation domain of validity.
* Can tell what it is doing under the hood.
For testing (those steps will be easier with the release candidate):
1. svn checkout http://svn.apache.org/repos/asf/sis/trunk/ SIS
2. cd SIS
3. mvn install
4. mvn org.apache.sis.core:sis-build-helper:dist --non-recursive
5. cd target/distribution/
6. unzip apache-sis-0.7-SNAPSHOT.zip
7. cd apache-sis-0.7-SNAPSHOT
8. bin/sis crs EPSG:3395
Apache SIS tries to use the Derby database embedded with Oracle JDK. If
you get an error message like "No EPSG:3395 code has been found in EPSG
subset", this means that SIS did not found the Derby database and
fallback on a very small subset of EPSG dataset hard-coded in SIS (and
which doesn't include EPSG:3395). One can dowload
http://repo2.maven.org/maven2/org/apache/derby/derby/10.12.1.1/derby-10.12.1.1.jar
and save the JAR file in the lib/ subdirectory.
If everything goes well, SIS should then display the EPSG terms of
agreement (only the first time the SIS command is run). If you accept
the terms, the EPSG database is installed and the WKT definition of
EPSG:3395 should appears.
For testing coordinate transformation, create a comma-separated values
with some values like below (axis order is latitude, longitude). The
last line at latitude 86°N is intentionally outside of Mercator
projection domain of validity.
20, 100
40, -100
86, 10
If the above CSV file is named "test.csv", then one can try the
following command:
bin/sis transform --sourceCRS EPSG:4326 --targetCRS EPSG:3395 test.csv
Output should be like below (CSV file format, with # for comment lines).
Note the warning for the point at latitude 86°N.
# Source: WGS 84 (EPSG:4326)
# Destination: WGS 84 / World Mercator (EPSG:3395)
# Methods: Mercator (variant A)
# Accuracy: 0.01 metres
"Easting", "Northing"
11131949.079, 2258423.649
-11131949.079, 4838471.398
1113194.908, 21353878.626, "Coordinate is outside the domain of
validity."
Above was a relatively simple map projections. Below is another example
(without providing points to transform, so we just get the description):
bin/sis transform --sourceCRS EPSG:27563 --targetCRS EPSG:3395
We get (note the more complex chain of operation methods, and the accuracy):
# Source: NTF (Paris) / Lambert Sud France (EPSG:27563)
# Destination: WGS 84 / World Mercator (EPSG:3395)
# Methods: Lambert Conic Conformal (1SP) → Longitude rotation → Geocentric
translations (geog2D domain) → Mercator (variant A)
# Accuracy: 2.0 metres
For those who want to see what SIS does under the hood, just add the
--verbose option. For the courageous who want to see what SIS *really*
does (the hood under the hood), one can add the --debug option after the
--verbose one. I will explain those things at the Apache conference in
two weeks.
Is there any comment, bug report, request for change?
Martin