Opened 12 years ago

Closed 12 years ago

Last modified 9 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: no UI/UX: no


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 12 years ago.
Initial patch for postgis backend

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by Robert Coup

Initial patch for postgis backend

comment:1 Changed 12 years ago by jbronn

Needs tests: set
Status: newassigned

comment:2 Changed 12 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 12 years ago by jbronn

milestone: 1.0 beta

comment:4 Changed 12 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 9 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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