From 24617b16679005d206e09cc507ed7e056ce574d1 Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Fri, 21 Dec 2007 21:36:54 +0000 Subject: [PATCH] gis: Fixed #6246 (Thanks jos3ph); removed unnecessary commented debugging code. git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6966 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/gis/db/models/query.py | 7 ------- django/contrib/gis/utils/ogrinspect.py | 15 +++++++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/django/contrib/gis/db/models/query.py b/django/contrib/gis/db/models/query.py index 1e5a4f0f5e..c289dedeb3 100644 --- a/django/contrib/gis/db/models/query.py +++ b/django/contrib/gis/db/models/query.py @@ -38,15 +38,8 @@ class GeoQuerySet(QuerySet): # 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' diff --git a/django/contrib/gis/utils/ogrinspect.py b/django/contrib/gis/utils/ogrinspect.py index 036ac58f2a..37e6673723 100644 --- a/django/contrib/gis/utils/ogrinspect.py +++ b/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