Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7579 closed (fixed)

Saving into SRID=-1 field causes st_transform error

Reported by: Robert Coup Owned by: jbronn
Component: GIS Version: gis
Severity: Keywords: srid
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

Currently if you define a GeometryField(srid=-1) then save a value with a srid != -1, then Django will attempt to transform the geometry to -1, causing a DB error.

I've attached a simple patch for Postgis but I suspect the same issue will occur in the other backends - is geoapp the best place to add tests for this?

Attachments (1)

django_-1_srid_patch.postgis.diff (632 bytes) - added by Robert Coup 8 years ago.
Initial patch for postgis backend

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Robert Coup

Initial patch for postgis backend

comment:1 Changed 8 years ago by jbronn

Needs documentation: unset
Needs tests: set
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 8 years ago by jbronn

Yes, geoapp would be the right place. A new model should be added with a geometry field that has a -1 srid.

comment:3 Changed 8 years ago by jbronn

milestone: 1.0 beta

comment:4 Changed 8 years ago by jbronn

Resolution: fixed
Status: assignedclosed

(In [7840]) gis: Fixed #7579; no longer attempt to transform input geometries if GeometryField has its SRID set to -1.

comment:5 Changed 5 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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