Opened 14 years ago
Closed 14 years ago
#3262 closed defect (fixed)
Problem setting coordinate system on some minimal .img files
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | HFA |
Cc: | gaopeng, esrixz |
Description
Attempting the script:
from osgeo import gdal ds = gdal.Open('float-rle.img',gdal.GA_Update) wkt = 'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 39",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994328]],UNIT["metre",1],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0]]' ds.SetProjection( wkt ) ds = None
script on the file:
results in a crash.
Change History (2)
comment:1 by , 14 years ago
Cc: | added |
---|---|
Status: | new → assigned |
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I have confirmed that this fixes the problem with the original file the problem was reported relative to, and I have backported the fix into 1.6-esri (r18185).
Note:
See TracTickets
for help on using tickets.
The problem seems to be that several data types are missing from the file that we assumed were always available. The apszDefDefn[] array of backup dictionary entries has been extended and then things work. The problem is new in trunk were we added support for extending the dictionary on existing files and various mechanisms to write out data type projections to existing files recently. The change is in trunk (r18184).