[Gdal-dev] sterea projection

Frank Warmerdam warmerdam at pobox.com
Wed Nov 9 22:57:54 EST 2005


On 11/9/05, Jan Hartmann <j.l.h.hartmann at uva.nl> wrote:
> Hi,
>
> I am trying to warp Geotiffs from epsg:28992 (Dutch national grid) to
> EPSG4326 (lat-lon WGS84). The PROJ epsg-file gives "stere" as projection
> for 28992, but "sterea" gives a better approximation in this case (see
> http://bugzilla.remotesensing.org/show_bug.cgi?id=980). Also, a
> "towgs84" parameter is needed for transforming to WGS84. I can use the
> complete, correct PROJ-string in cs2cs, mapserver and postgis by
> replacing the values in the epsg file/spatial_ref_sys table, but for
> gdalwarp this does not work. When I give the complete PROJ-string in
> gdalwarp, e.g.
>
> gdalwarp -s_srs "+proj=sterea +lat_0=52.15616055555555
> +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000
> +ellps=bessel  +units=m
> +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812
> +no_defs +to +proj=latlong +datum=WGS84" -t_srs input.tif output.tif
>
> I get an error "Error 1: Translating source or target SRS failed." With
> "+proj=stere" everything works, but then the transformation is not exact.
>
> Is there any way to get these parameters into gdalwarp?

Jan,

The problem here is that gdalwarp is converting the PROJ.4
coordinate system definition into WKT internally, and then back
into PROJ.4 format before passing to PROJ.4 itself.   There is
no obvious formulation for sterea in WKT.

This particular problem (sterea) should be corrected by
making sterea the default translation of the WKT
projection name "OBLIQUE_STEREOGRAPHIC".

It doesn't fix the general problem that PROJ.4 arguments
to programs like gdalwarp aren't always preserved all the
way down to PROJ.4 itself.

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




More information about the Gdal-dev mailing list