[postgis-users] transform error for swiss projection

strk at refractions.net strk at refractions.net
Mon Nov 1 08:03:17 PST 2004


On Mon, Nov 01, 2004 at 11:00:50AM -0500, Frank Warmerdam wrote:
> Johannes Bühler wrote:
> >Hi, 
> >im trying to transform a geometry from wgs84 to the swiss epsg:2056 or 
> >epsg:21781. i compiled postgis 0.9 with postgresql 8.0beta4 and have the 
> >most current version of proj4 (4.4.9) installed as well. but when i 
> >execute the folling statement 
> >select transform(GeometryFromText('POINT(7.675133 47.533609)',4326), 
> >21781);
> >
> >i get the following error message.
> >
> >FEHLER:  tranform: couldnt parse proj4 output string
> >KONTEXT:  PL/pgSQL function "transform" line 2 at return
> >
> >using other target projections it works.
> >
> >using the most current gdal 1.2.3 the conversation is fine. But there has 
> >been the same problem before as described in 
> >http://bugzilla.remotesensing.org/show_bug.cgi?id=423
> >
> >so probably its the same problem 
> >
> >Thanks for any help
> >
> >with kind regards
> >
> >Johannes Buehler
> 
> Johannes,
> 
> I would suggest trying to update the proj4text field in the spatial_ref_sys
> table to be as follows for the SRID in question:
> 
> +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000
> +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m 
> +no_defs
> 
> I believe the problem is that the spatial_ref_sys table is out of date since
> I ignored Paul's last request for a new dump.
> 
> BTW, a dump of data for the spatial_ref_sys table can be done like this
> (from within the gdal/data directory assuming you have python support):
> 
>   ../pymod/epsg_tr.py -postgis -list pcs.csv > srs.sql
>   ../pymod/epsg_tr.py -postgis -list gcs.csv >> srs.sql
> 
> This dumps all the EPSG pcs and gcs values into a ready to run SQL
> script.  You might need to first drop your existing spatial_ref_sys table if
> you have one.  I have placed the above .sql file at:
> 
>  http://home.gdal.org/~warmerdam/srs.sql

ERROR 404: Not Found.

--strk;

> 
> 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    | Geospatial Programmer for Rent
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list