[postgis-users] Using grids transformation method with PostGis

Luís de Sousa luis.a.de.sousa at gmail.com
Wed Jun 9 02:07:39 PDT 2010


Dear Frank,

Thank you for your message, please read my comments below:

>A few suggestions:
>
> * The +nadgrids= directive can include a full path if you want to be
>   certain that path issues are not coming into play.

I tried this first, the result is exactly the same.

> * If you can ensure that the PROJ_DEBUG environment variable is set to
>   some value before running the postgres server, you may well see proj
>   debug output in the terminal window or log for the server.  This should
>   include information on what grid shift files are picked up and used for
>   transformations.

Ok, I'll try that next.

> * Your email did not make it clear what the definitions were for
>   pt:dlxhg, +init=pt:pttm06 or what the proj4text for 3763 is in the
>   database making it hard to see if the transform was the same as you
>   did with cs2cs.

Here are the definitions in the /usr/share/proj directory:

# PTTM06 do datum ETRS89
<pttm06>
+proj=tmerc
+ellps=GRS80
+towgs84=0,0,0
+lat_0=39d40'05.73"N
+lon_0=08d07'59.19"W
<>

# Hayford-Gauss datum Lisboa
<dlxhg>
+proj=tmerc
+ellps=intl
+nadgrids=ptLX_e89.gsb
+lat_0=39d40
+lon_0=8d07'54.862"W
<>

And here are the strings in the PostGis database:

pontosDTU=# select proj4text from spatial_ref_sys where srid = 20791;
 +proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=0 +y_0=0
+ellps=intl +pm=lisbon +units=m +no_defs
+nadgrids=/usr/share/proj/ptLX_e89.gsb

pontosDTU=# select proj4text from spatial_ref_sys where srid = 3763;
 +proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1
+x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs

If you or somebody else want to try it up, the gird files package is
available from the University of Oporto, courtesy of prof J.A.
Gonçalves:

http://www.fc.up.pt/pessoas/jagoncal/coordenadas/grelhas.zip

I unpacked all its contents to /usr/share/proj. Btw, my system is Ubuntu 9.10.

Before I go, I just want to make sure that in principle PostGis should
be able to use the grid files simply by the indication of its
location, no additional configurations needed. Is this correct?

Thank you once more,

Luís



More information about the postgis-users mailing list