Skip to content

cgendreau/geocalc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geocalc

Geodetic Calculator based on GeoTools.

Includes spanish NTv2 Grid Shift for accurate conversion from ED50 to ETRS89 and WGS84.

Building

Needs Maven 2:

git clone [email protected]:oscarfonts/geocalc.git
./dist.sh

Note

There's a bug in GeoTools that prevents NTv2 grid files to be read from jar packages. The issue and the patch to gt-referencing: https://jira.codehaus.org/browse/GEOT-4420

Running

From commandline

java -jar geocalc-1.0-jar <src_EPSG> <dst_EPSG> <x> <y>

Example:

java -jar geocalc-1.0-jar EPSG:23031 EPSG:4326 438000 4642000

From java code

Just a static transform2DPoint method:

import co.geomati.Geocalc;

double[] result = Geocalc.transform2DPoint("EPSG:23031", "EPSG:4326", 438000, 4642000);
System.out.printf("x: %f - y: %f\n", result[0], result[1]);

About

Geodetic Calculator based on GeoTools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published