Ticket #15533: osmgeoadminfix.diff
File osmgeoadminfix.diff, 1.1 KB (added by , 14 years ago) |
---|
-
django/contrib/gis/admin/widgets.py
1 1 from django.conf import settings 2 from django.contrib.gis.gdal import OGRException 2 from django.contrib.gis.gdal import OGRException, SRSException 3 3 from django.contrib.gis.geos import GEOSGeometry, GEOSException 4 4 from django.forms.widgets import Textarea 5 5 from django.template import loader, Context … … 54 54 if value.srid != srid: 55 55 try: 56 56 ogr = value.ogr 57 ogr.transform(srid) 57 try: 58 ogr.transform(srid) 59 except SRSException: 60 # 900913 is deprecated, 3857 is the official projection 61 if srid == 900913: 62 ogr.transform(3857) 63 else: 64 raise 58 65 wkt = ogr.wkt 59 66 except OGRException: 60 67 wkt = ''