[Gdal-dev] ERROR 6: Failed to initialize PROJ.4 with ...

Frank Warmerdam warmerdam at pobox.com
Thu Jul 5 14:04:23 EDT 2007


Helmut Kudrnovsky wrote:
> hi,
> 
> i've tried to warp a geotiff with the following command by the mean of gdal of the FWtools1.3.4 on a win-xp-machine:
> 
> C:\data_rev\rect>gdalwarp -of GTiff -s_srs Austria_GK_MGI_M31.prj -t_srs dhdn_zone3.prj teil2_gw_gk31.tif teil2_gw_dhdnz3.tif
> 
> where Austria_GK_MGI_M31.prj is:
> 
> PROJCS["Austria_MGI_M31",GEOGCS["GCS_MGI",DATUM["D_MGI",SPHEROID["Bessel_1841",6377397.155,299.1528128],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",-5000000.0],PARAMETER["Central_Meridian",13.33333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
...
> ERROR 6: Failed to initialize PROJ.4 with `+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '.

Helmut,

I don't know why you are getting this error.  I saved your WKT above to a
file and tested it with test epsg and it seemed to work fine.  You might
want to try "testepsg Austria_GK_MGI_M31.prj" in the FWTools shell to
check it at your end.  When I do it, I get something ending with:

PROJ.4 rendering of [1.wkt] = +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 
+k=1.000000 +x_0=0 +y_0=-5000000 +ellps=bessel 
+towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs

> Creating output file that is 3643P x 3885L.
> Processing input file teil2_gw_gk31.tif.
> ERROR 6: Failed to initialize PROJ.4 with `+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '.
> :0...10...20...30...40...50...60...70...80...90...100 - done.
> 
> what does this error message "ERROR 6: Failed to initialize PROJ.4..." mean?  i've got the TOWGS84 parameters for source (epsg-code: 1618, MGI to WGS 84-3) and target (epsg-code: 1777, DHDN to WGS 84-2)  from the epsg-database

For some reason the geographic coordinate system parameters are being
translated but the projection and it's parameters are not.

By the way, the following does not work because EPSG:4314 and EPSG:4312
are geographic coordinate systems and the (projected) input coordinate
are outside the valid range for latitude and longitude angles.

 > gdalwarp -of GTiff -s_srs EPSG:4312 -t_srs EPSG:4314 teil2_gw_gk31.tif
 > >teil2_gw_dhdnz3.tif

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 OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list