Opened 6 years ago
Closed 6 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)
Change History (4)
comment:1 by , 6 years ago
| Summary: | SRID data on GEOSGeometry is lost after calling `reverse()` method → GEOSGeometry.reverse() loses SRID. |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Version: | 2.1 → master |
Note:
See TracTickets
for help on using tickets.
Thanks for this report.
Reproduced at c498f088c584ec3aff97409fdc11b39b28240de9.