Opened 12 years ago
Closed 12 years ago
#19171 closed Bug (fixed)
unnecessary SRID lookup makes coordinate transform from custom SRS to standard SRS fail
Description ¶
Running the attached script crashes with django.contrib.gis.gdal.error.SRSException: Unsupported SRS.
. It shouldn't, as the CoordTransform
object contains complete information for the transformation.
The problem seems to be that the SRID of point b
is looked up before the transformation, and this lookup fails (as is expected, because it's a custom SRS). But the lookup is not necessary, because the SRID of point b
is ignored during the transformation (which can be demonstrated by substituting a bogus SRID on b
before the transformation -- the results are still correct).
This is Django version 1.4.1 on:
- Fedora 14 with custom-compiled GDAL 1.9.2, GEOS 3.3.5, and PROJ4 4.8.0
- Debian Wheezy with GDAL 1.9.0, GEOS 3.3.3, and PROJ4 4.7.0 that came with the OS.
Change History (5)
by , 12 years ago
Attachment: | djangofail.py added |
---|
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
Has patch: | set |
---|
As the crash was happening during the build of the ogr geometry equivalent, I'd rather fix the issue at that level, and default to a "naive" ogr geometry when a SRSException occurred.
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
script to demonstrate bug