[Gdal-dev] Strange behaviour

Frank Warmerdam warmerdam at pobox.com
Tue Sep 18 09:45:29 EDT 2007


Jose Luis Gomez Dans wrote:
> Hi,
> I have found a problem with my python code when I reproject data using GDAL's python wrappers. For some reason, my SpatialReferences() get thrashed in some cases. I don't know where to start looking, but in my module, here are some results:
> s =osr.SpatialReference()
> s.ImportFromEPSG(23030)
> s.ExportToWkt()
> 'PROJCS["ED50 / UTM zone 30N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin","nan"],PARAMETER["central_meridian","nan"],PARAMETER["scale_factor",0],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","23030"]]'
> s.ExportToProj4()
> '+proj=tmerc +lat_0=nan +lon_0=nan +k=0,000000 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '
> 
> In a clean python instance, after importing osr, the results are as expected (i.e. non NaNs and stuff like that). I don't know where to start looking, whether this is locale, or file, or gdal version related (I'm using 1.4.1 on Linux/i386). The problem does not appear in Windows with an older version of GDAL.
> 
> Does anyone have any clues as to where to start looking for trouble?

Jose,

I have a feeling this is something I have run into myself, and fixed.
Could you try source snapshot at:

   http://download.osgeo.org/gdal/daily/gdalsvn-trunk-20070918.zip

If the problem persists then I think you will need to file a detailed bug
report on how to reproduce the problem.

You might also want to try and reproduce the problem with an FWTools build
to help isolate possible build option issues.

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