[Django] #25585: OGRGeometry.srid and OGRGeometry.srs cannot be set to None

3 views
Skip to first unread message

Django

unread,
Oct 21, 2015, 9:59:44 AM10/21/15
to django-...@googlegroups.com
#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.

Django

unread,
Oct 21, 2015, 10:01:12 AM10/21/15
to django-...@googlegroups.com
#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 | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by sir-sigurd):

* 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>

Django

unread,
Oct 21, 2015, 2:46:21 PM10/21/15
to django-...@googlegroups.com
#25585: OGRGeometry.srid and OGRGeometry.srs cannot be set to None
----------------------------+------------------------------------

Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------
Changes (by claudep):

* version: 1.8 => master
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/25585#comment:2>

Django

unread,
Oct 21, 2015, 6:54:54 PM10/21/15
to django-...@googlegroups.com
#25585: OGRGeometry.srid and OGRGeometry.srs cannot be set to None
----------------------------+------------------------------------
Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages