Opened 5 years ago

Closed 5 years ago

#30552 closed Bug (fixed)

GEOSGeometry.reverse() loses SRID.

Reported by: Yury Ryabov Owned by: nobody
Component: GIS Version: dev
Severity: Normal Keywords: SRID, geometry, GIS
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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!'

Attachments (1)

30552.diff (916 bytes ) - added by Mariusz Felisiak 5 years ago.
Simple test.

Download all attachments as: .zip

Change History (4)

comment:1 by Mariusz Felisiak, 5 years ago

Summary: SRID data on GEOSGeometry is lost after calling `reverse()` methodGEOSGeometry.reverse() loses SRID.
Triage Stage: UnreviewedAccepted
Version: 2.1master

Thanks for this report.

Reproduced at c498f088c584ec3aff97409fdc11b39b28240de9.

by Mariusz Felisiak, 5 years ago

Attachment: 30552.diff added

Simple test.

comment:2 by Claude Paroz, 5 years ago

Has patch: set

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: newclosed

In 3c6d32e:

Fixed #30552 -- Fixed loss of SRID when calling reverse() on LineString/Point.

Thanks Mariusz Felisiak for contributing the Point part.

Note: See TracTickets for help on using tickets.
Back to Top