PG Driver less tolerant with SRID definition in 1.10 vs 1.9
|Reported by:||AlexGacon||Owned by:||warmerdam|
I am migrating my project from GDAL 1.9.0 to 1.10.0 and I have regressions in some features of my software.
The problem is related with a postgres view which is not declared in geometry_columns.
In version 1.9.0, since GDAL always asks the SRID with getsrid, it retrieved the SRID without problem.
In version 1.10.0, GDAL find a geometry column, a table name and a schema in the request and thus retrieve the SRID from geometry_columns. The SRID is not found, so we get a -1 value and the request fails.
I manage to fix the problem in my software by changing in OGRPGResultLayer::GetSpatialRef?, line 356:
if( nSRSId == UNDETERMINED_SRID )
if( nSRSId == UNDETERMINED_SRID || nSRSId == -1)
Could this fix be integrated in the trunk ?