Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gis: Fixed #6246 (Thanks jos3ph); removed unnecessary commented debug…

…ging code.

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 24617b16679005d206e09cc507ed7e056ce574d1 1 parent 34560a0
@jbronn jbronn authored
View
7 django/contrib/gis/db/models/query.py
@@ -38,15 +38,8 @@ def __init__(self, model=None):
# If GEOM_SELECT is defined in the backend, then it will be used
# for the selection format of the geometry column.
if GEOM_SELECT:
- #if oracle and hasattr(self, '_ewkt'):
# Transformed geometries in Oracle use EWKT so that the SRID
# on the transformed lazy geometries is set correctly).
- #print '-=' * 20
- #print self._ewkt, GEOM_SELECT
- #self._geo_fmt = "'SRID=%d;'||%s" % (self._ewkt, GEOM_SELECT)
- #self._geo_fmt = GEOM_SELECT
- #else:
- #print '-=' * 20
self._geo_fmt = GEOM_SELECT
else:
self._geo_fmt = '%s'
View
15 django/contrib/gis/utils/ogrinspect.py
@@ -110,14 +110,17 @@ def _ogrinspect(data_source, model_name, geom_name='geom', layer_key=0, srid=Non
# Setting up the SRID parameter string.
if srid is None:
- srid = layer.srs.srid
- if srid is None:
+ if layer.srs is None:
srid_str = 'srid=-1'
- elif srid == 4326:
- # WGS84 is the default.
- srid_str = ''
else:
- srid_str = 'srid=%s' % srid
+ srid = layer.srs.srid
+ if srid is None:
+ srid_str = 'srid=-1'
+ elif srid == 4326:
+ # WGS84 is the default.
+ srid_str = ''
+ else:
+ srid_str = 'srid=%s' % srid
else:
srid_str = 'srid=%s' % srid
Please sign in to comment.
Something went wrong with that request. Please try again.