#25585: OGRGeometry.srid and OGRGeometry.srs cannot be set to None ----------------------------+-------------------- Reporter: sir-sigurd | Owner: nobody Type: Bug | Status: new Component: GIS | Version: 1.8 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 1 Easy pickings: 0 | UI/UX: 0 ----------------------------+-------------------- {{{ In [1]: from django.contrib.gis.gdal import OGRGeometry
In [2]: p = OGRGeometry('POINT(1 1)') In [3]: print p.srs None In [4]: p.srs = p.srs --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-d4701752b51c> in <module>() ----> 1 p.srs = p.srs /home/sergey/dev/django/django/contrib/gis/gdal/geometries.pyc in _set_srs(self, srs) 272 srs_ptr = sr.ptr 273 else: --> 274 raise TypeError('Cannot assign spatial reference with object of type: %s' % type(srs)) 275 capi.assign_srs(self.ptr, srs_ptr) 276 TypeError: Cannot assign spatial reference with object of type: <type 'NoneType'> In [5]: print p.srid None In [6]: p.srid = p.srid --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-3612b78cc827> in <module>() ----> 1 p.srid = p.srid /home/sergey/dev/django/django/contrib/gis/gdal/geometries.pyc in _set_srid(self, srid) 288 self.srs = srid 289 else: --> 290 raise TypeError('SRID must be set with an integer.') 291 292 srid = property(_get_srid, _set_srid) TypeError: SRID must be set with an integer. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/25585> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.083cffc52ebbb86e57484bb217557148%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.