[Django] #30552: SRID data on GEOSGeometry is lost after calling `reverse()` method

7 views
Skip to first unread message

Django

unread,
Jun 7, 2019, 5:20:09 AM6/7/19
to django-...@googlegroups.com
#30552: SRID data on GEOSGeometry is lost after calling `reverse()` method
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
ssrebelious |
Type: Bug | Status: new
Component: GIS | Version: 2.1
Severity: Normal | Keywords: SRID, geometry, GIS
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Following code reproduces the bug. Haven't tested if it persists on Django
2.2.

{{{
from django.contrib.gis.geos import GEOSGeometry

linestring = GEOSGeometry('LINESTRING(0 1, 1 2)', srid=4326)
assert linestring.srid == 4326
linestring.reverse()
assert linestring.srid == 4326, 'SRID data is lost!'
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30552>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 7, 2019, 6:40:59 AM6/7/19
to django-...@googlegroups.com
#30552: GEOSGeometry.reverse() loses SRID.
-------------------------------------+------------------------------------
Reporter: ssrebelious | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: SRID, geometry, GIS | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by felixxm):

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


Comment:

Thanks for this report.


Reproduced at c498f088c584ec3aff97409fdc11b39b28240de9.

--
Ticket URL: <https://code.djangoproject.com/ticket/30552#comment:1>

Django

unread,
Jun 7, 2019, 6:41:17 AM6/7/19
to django-...@googlegroups.com
#30552: GEOSGeometry.reverse() loses SRID.
-------------------------------------+------------------------------------
Reporter: ssrebelious | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: SRID, geometry, GIS | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by felixxm):

* Attachment "30552.diff" added.

Simple test.

Django

unread,
Jul 27, 2019, 5:24:13 AM7/27/19
to django-...@googlegroups.com
#30552: GEOSGeometry.reverse() loses SRID.
-------------------------------------+------------------------------------
Reporter: Yury Ryabov | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: SRID, geometry, GIS | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Claude Paroz):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/11599 PR]

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

Django

unread,
Jul 27, 2019, 2:13:56 PM7/27/19
to django-...@googlegroups.com
#30552: GEOSGeometry.reverse() loses SRID.
-------------------------------------+------------------------------------
Reporter: Yury Ryabov | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed
Keywords: SRID, geometry, GIS | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"3c6d32e0b233bc44eb4533f81819353036ae35e4" 3c6d32e]:
{{{
#!CommitTicketReference repository=""
revision="3c6d32e0b233bc44eb4533f81819353036ae35e4"
Fixed #30552 -- Fixed loss of SRID when calling reverse() on
LineString/Point.

Thanks Mariusz Felisiak for contributing the Point part.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30552#comment:3>

Reply all
Reply to author
Forward
0 new messages