Skip to content

Instantly share code, notes, and snippets.

@galex
Created October 18, 2010 07:05
Show Gist options
  • Save galex/631844 to your computer and use it in GitHub Desktop.
Save galex/631844 to your computer and use it in GitHub Desktop.
geotoolkit-lambert72-to-wgs84
CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:9803") ;
CoordinateReferenceSystem targetCRS = DefaultGeographicCRS.WGS84;
MathTransform tr = CRS.findMathTransform(sourceCRS, targetCRS);
DirectPosition sourcePt = new GeneralDirectPosition(coordinates.getDouble(0), coordinates.getDouble(1), 0);
DirectPosition targetPt = tr.transform(sourcePt, null);
System.out.println("Source point: " + sourcePt);
System.out.println("Target point: " + targetPt);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment