Hi Simon,

Good to hear that you got this issue figured out. I looked into the
spatial_ref_sys table for postgis and found the following proj4
definitions for the CRS's:

4326 = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '

27700 = '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000
+y_0=-100000 +ellps=airy +units=m +no_defs '

(no_defs apparently means don't use default values for parameters)

So the correct transformation between 4326 and 27700 require a datum
shift and a transverse mercator projection. No parameters are given for
the datum shift, so it cannot be done.

So while geotools is probably giving a better answer by doing the datum
shift, remember that the 3 and 7 parameter datum shifts (aka Bursa Wolf)
are sometimes only accurate to +- 10 m (accuracies for different
parameters are given in the NIMA TR8350.2 document). However this is
preferable to having the transformation off by 100m, which is the case
if no datum transformation is performed. Different transformation
methods (for north america) can have errors of 1m or less, though
geotools does not automatically use them right now. I do not know if the
UK has any high accuracy transformation methods for Airy to WGS84.

Rueben

P.S. Geotools implements the proj4 transverse mercator code, so I do not
know where the 0.05 m differences are coming from. Perhaps we use
slightly different values for semi-major and minor axises for wgs84?



On Thu, 2005-27-10 at 09:15 +0000, Simon Turner wrote:
> Right, I tried it without the Bursa Wolf parameters, and indeed the results 
> are near identical:
> 
> epsg-wkt:
> 
> 278204.21690185793, 187591.0788272909
> 
> PostGIS: 
> 
> 278204.250150917 187591.006280736
> 
> As opposed to epsg-hsql:
> 
> 278291.1032887026, 187619.97719849477
> 
> So your hypothesis is correct. Digging into the PROJ.4 docs, it says: 
> "Support has also been added for 3 and 7 parameter datum shifts" but various 
> mailing list posts imply that PostGIS maybe doesn't always take advantage, 
> eg: "The most common reason for failure to populate a datum shift is that 
> there are more than one available going to WGS84 for a given datum. Since I 
> can't know which is best, I just ignore them all." - 
> http://postgis.refractions.net/pipermail/postgis-users/2005-October/009678.html).
>  
> 
> As a novice, I am struggling to understand the details, so suffice to say 
> that GeoTools is accurate and (my Windows installation of) PostGIS/PROJ.4 is 
> not!
> 
> Thanks again.
> 
> Simon
> 
> 
> -------------------------------------------------------
> 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



-------------------------------------------------------
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

Reply via email to