Django

Code

Ticket #7579 (closed: fixed)

Opened 2 months ago

Last modified 2 months ago

Saving into SRID=-1 field causes st_transform error

Reported by: rcoup Assigned to: jbronn
Milestone: 1.0 beta Component: GIS
Version: gis Keywords: srid
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 1 Patch needs improvement: 0

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

django_-1_srid_patch.postgis.diff (0.6 kB) - added by rcoup on 06/30/08 17:47:28.
Initial patch for postgis backend

Change History

06/30/08 17:47:28 changed by rcoup

  • attachment django_-1_srid_patch.postgis.diff added.

Initial patch for postgis backend

07/01/08 13:05:39 changed by jbronn

  • status changed from new to assigned.
  • needs_better_patch changed.
  • needs_tests set to 1.
  • needs_docs changed.

07/01/08 13:06:29 changed by jbronn

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

07/01/08 13:29:50 changed by jbronn

  • milestone set to 1.0 beta.

07/05/08 11:59:51 changed by jbronn

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #7579 (Saving into SRID=-1 field causes st_transform error)




Change Properties
Action