Opened 13 years ago
Closed 12 years ago
#4187 closed defect (fixed)
Open a .ecw with EPSG PCS/GCS code -1 fails
Reported by: | bkrangnes | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | GDAL_Raster | Version: | 1.8.1 |
Severity: | normal | Keywords: | EPSG -1 ECW SWIG Exception |
Cc: |
Description
We use Gdal 1-8-1 and the following code to open an .ecw file with :
OSGeo.GDAL.Gdal.Open(fileName, 0) The following error is returned:
“EPSG PCS/GCS code -1 not found in EPSG support files. Is this a valid EPSG coordinate system?”
Gdalinfo reports the following on the .ecw file: ERROR 6: EPSG PCS/GCS code -1 not found in EPSG support files. Is this a valid EPSG coordinate system?
When using an older version of gdal the .ecw file is opened ok.
Is -1 a valid code to use or is gdal not handling this correctly?
Change History (5)
comment:1 by , 13 years ago
Status: | new → assigned |
---|
comment:2 by , 13 years ago
Keywords: | ECW SWIG Exception added; in .ecw file removed |
---|
follow-up: 4 comment:3 by , 13 years ago
Actually, to confirm, you are getting a fatal exception from the Open() method, right? Or were you just concerned about the reported runtime error? What language are you working in? Java?
comment:4 by , 13 years ago
Replying to warmerdam:
Actually, to confirm, you are getting a fatal exception from the Open() method, right? Or were you just concerned about the reported runtime error? What language are you working in? Java?
I get a fatal exception from the Open() method and use C#. I am not in a position to rebuild.
comment:5 by , 12 years ago
Milestone: | → 1.9.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
-1 is not a valid EPSG code, but it should not be a fatal error. The problem is that an error is issued, and the SWIG Bindings are throwing an exception even though the open actually worked. The usual way of dealing with this is to clear such errors when we don't want to treat them as serious.
I will try to fix this. Are you in a position to rebuild with a small code change? I can't think of any workaround.