[Gdal-dev] Strange behaviour

Jose Luis Gomez Dans josegomez at gmx.net
Tue Sep 18 03:50:53 EDT 2007


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?

Thanks!
Jose


-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger



More information about the Gdal-dev mailing list