[gdal-dev] ERROR 6: Failed to initialize PROJ.4 -- convert from BNG
to WGS84; using gdalwarp
Andreas Joisten
mail at andreas-joisten.de
Tue Mar 23 04:51:57 EDT 2010
Hi all,
I want to use gdalwarp to convert a GeoTiff file in BNG (British National Grid) to WGS84, but I got the following error:
ERROR 6: Failed to initialize PROJ.4 with `+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.
9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs
'.
The input file in BNG looks like:
Size is 2365, 2366
Coordinate System is:
PROJCS["unnamed",
GEOGCS["OSGB 1936",
DATUM["OSGB_1936",
SPHEROID["Airy 1830",6377563.396,299.3249646000044,
AUTHORITY["EPSG","7001"]],
AUTHORITY["EPSG","6277"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4277"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",49],
PARAMETER["central_meridian",-2],
PARAMETER["scale_factor",0.9996012717],
PARAMETER["false_easting",400000],
PARAMETER["false_northing",-100000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (546999.336021105410000,263500.317128534600000)
Pixel Size = (0.634719746381245,-0.634719746381245)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 546999.336, 263500.317)
Lower Left ( 546999.336, 261998.570)
Upper Right ( 548500.448, 263500.317)
Lower Right ( 548500.448, 261998.570)
Center ( 547749.892, 262749.444)
Band 1 Block=2365x3 Type=Byte, ColorInterp=Palette
This is the command to convert into WGS84:
gdalwarp -s_srs "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs" -t_srs "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" geo_BNG_proj4.tif geo_wgs84_13.tif
Which data is required to initialize PROJ.4 correct?
Many thanks for your help.
More information about the gdal-dev
mailing list