[postgis-users] Interesting Datum Conversion Issue
Frank Warmerdam
warmerdam at pobox.com
Thu May 25 07:17:55 PDT 2006
René F. Viancos S. wrote:
> Record added to spatial_ref_sys Table
>
> srid : 50000
> auth_name : EPSG
> auth_srid: 50000
> srtext : Sad69 a wgs84
> proj4text : +proj=utm +zone=19 +south +ellps=GRS67 +towgs84=75,1,44
> +unit=m +to +proj=utm +zone=19 +south +datum=WGS84 +no_defs
René,
The proj4text should not contain the "+to ..." portion. It should
really read "+proj=utm +zone=19 +south +ellps=GRS67 +towgs84=75,1,44 +unit=m".
> To run this custom datum transformation we use the transform() function
> build in a query inserted as parameter in the pgsql2shp command.
>
> pgsql2shp -h localhost -p 5432 -u pgsql -P pgsql -f shapefile_name.shp
> db_name
> "select transform(setsrid(the_geom
> ,29179),50000) as the_geom from nombre_tabla"
The above sets the source geometry to have SRID 29179 which I assume
translates as:
+proj=utm +zone=19 +south +ellps=GRS67 +units=m +no_defs
And the request is to convert to SRID 50000. I believe what you
should be doing is setting the source SRID to 50000, and requesting
a conversion to SRID 32719 which translates as "+proj=utm +zone=19
+south +ellps=WGS84 +datum=WGS84 +units=m".
I believe you end up having to reverse the signs because you have
the transformation backward.
So:
"select transform(setsrid(the_geom,50000),32719)"
Having tried to dig through this email and answer the questions, I
am not feeling that this problem is very familiar and that I may
have answered it before.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF, http://osgeo.org
More information about the postgis-users
mailing list