Does anyone know what the accuracy of the transformations in GeoTools are,
compared with those of other software, such as PROJ.4? I ask because I am
getting different results for the same transformations, with variation up to 90
metres. I had assumed that there was a single widely-used algorithm for any
given transformation, so the results would be consistent across applications
(or was I being hopelessly naive?)
Just as a for instance:
Transformation in PostGIS (which uses PROJ.4):
select AsText(Transform(GeomFromText('POINT(-3.75772145997185
51.5742232897346)', 4326), 27700)) as metres;
metres
------------------------------------------
POINT(278204.250150917 187591.006280736)
Same transformation in GeoTools with the epsg HSQL jar on the classpath:
CRSAuthorityFactory crsFac = FactoryFinder.getCRSAuthorityFactory("EPSG", null);
CoordinateReferenceSystem wgs84crs =
crsFac.createCoordinateReferenceSystem("4326");
CoordinateReferenceSystem osgbCrs =
crsFac.createCoordinateReferenceSystem("27700");
CoordinateOperation op = new
DefaultCoordinateOperationFactory().createOperation(wgs84crs, osgbCrs);
DirectPosition latlong = new GeneralDirectPosition(51.5742232897346,
-3.75772145997185);
op.getMathTransform().transform(latlong, latlong);
System.out.println(latlong);
> GeneralDirectPosition[278291.1032887026, 187619.97719849477]
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users