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.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
PR -- https://github.com/django/django/pull/5458
--
Ticket URL: <https://code.djangoproject.com/ticket/25585#comment:1>
* version: 1.8 => master
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25585#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"0dbe897ab5ea055ed53a219f642348d98e1c3cf9" 0dbe897]:
{{{
#!CommitTicketReference repository=""
revision="0dbe897ab5ea055ed53a219f642348d98e1c3cf9"
Fixed #25585 -- Allowed setting OGRGeometry srid/srs attributes to `None`.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25585#comment:3>