Opened 16 years ago

Closed 16 years ago

Last modified 13 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

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

Download all attachments as: .zip

Change History (6)

by Robert Coup, 16 years ago

Initial patch for postgis backend

comment:1 by jbronn, 16 years ago

Needs tests: set
Status: newassigned

comment:2 by jbronn, 16 years ago

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

comment:3 by jbronn, 16 years ago

milestone: 1.0 beta

comment:4 by jbronn, 16 years ago

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 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

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