[Gdal-dev] gdalwarp: Translating source or target SRS failed

Frank Warmerdam warmerdam at pobox.com
Fri May 5 12:58:45 EDT 2006


Jachym Cepicky wrote:
> Hallo,
> 
> I try to reproject some raster files using gdalwarp:
> 
> gdalwarp -s_srs "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0  +y_0=0 +ellps=bessel +units=m +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56" -t_srs "+proj=latlong +datum=WGS84" teplota.tif teplota-wgs.tif
>  
> ERROR 1: Translating source or target SRS failed:
> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56
> 
> When I use cs2cs for signle coordinates pair, it works great:
> 
> echo "-868208.53      -1095793.57"| cs2cs  +proj=krovak +lat_0=49.5
> +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0
> +y_0=0 +ellps=bessel +units=m +no_defs
> +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +to +proj=latlong
> +datum=WGS84
> 12d48'25.16"E   49d27'8.146"N 46.959

Jachym,

It seems that the PROJ.4 -> Well Known Text translation code in
OGR is missing the Krovak case.  I will add it but this fix has
missed the GDAL 1.3.2 release.

... work, work, work ...

OK, it's in CVS now.

Note, you can put something like the following in a text file,
and reference that in your gdalwarp command to get Krovak support
without my fix.

PROJCS["Krovak",
     GEOGCS["Bessel 1841",
         DATUM["D_unknown",
             SPHEROID["bessel",6377397.155,299.1528128]],
         PRIMEM["Greenwich",0],
         UNIT["Degree",0.017453292519943295]],
     PROJECTION["Krovak"],
     PARAMETER["latitude_of_center",49.5],
     PARAMETER["longitude_of_center",24.83333333333333],
     PARAMETER["scale_factor",0.9999],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",0],
     UNIT["Meter",1]]

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 Gdal-dev mailing list