[Gdal-dev] gdalwarp: different results with proj4 and WKT SRS information

Nicolas Ribot nicky666 at gmail.com
Wed Dec 6 13:10:03 EST 2006


Hi all,

I noticed the following behaviour with gdalwarp:

When warping an image, I set the t_srs parameter to be a PROJ4 string
coming from a MapInfo tab file (projection got with:

ogr.Open(poly_filename).GetLayer(0).GetSpatialRef().ExportToProj4()
where poly_filename is the name of the TAB file

The warped image is not correct and I can see a slight shift between
the image and the mapinfo TAB file displayed on it.

When I do not use the proj4 string, but instead a file containing the
WKT srs definition got from the same TAB file, I get the correct
result for the warped image.

Am I missing something with t_srs parameter ?

Here is the proj4 string from my MAPINFO file:
+proj=lcc +lat_1=60 +lat_2=69 +lat_0=60 +lon_0=-132.5 +x_0=0 +y_0=0
+ellps=GRS80 +datum=NAD83 +units=m +no_defs

and the WKT SRS from the same file:
PROJCS["unnamed",GEOGCS["unnamed",DATUM["North_American_Datum_1983",SPHEROID["GRS
80",6378137,298.257222101],TOWG
S84[0,0,0,-0,-0,-0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Con
ic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",69],PARAMETER["latitude_of_origin",6
0],PARAMETER["central_meridian",-132.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1
.0]]

Nicolas



More information about the Gdal-dev mailing list