Django

Code

Ticket #5498 (closed: wontfix)

Opened 1 year ago

Last modified 7 months ago

GeoDjango not compatible with PostGIS 1.1.0

Reported by: jbronn Assigned to: jbronn
Milestone: Component: GIS
Version: gis Keywords: gis sprint geodjango postgis
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 1 Patch needs improvement: 0

Description

Matthew Wensing posted this message on django-dev. There are hardcoded 'ST_' references in GEOS base.py and in PostGIS spatial backend that should be fixed.

Attachments

gis_5498.diff (1.5 kB) - added by rcoup on 09/28/07 01:50:38.
use GEOM_FUNC_PREFIX in backend.postgis.field

Change History

09/28/07 01:50:38 changed by rcoup

  • attachment gis_5498.diff added.

use GEOM_FUNC_PREFIX in backend.postgis.field

(follow-up: ↓ 3 ) 09/28/07 01:50:54 changed by rcoup

  • needs_better_patch changed.
  • has_patch set to 1.
  • needs_tests changed.
  • needs_docs changed.

See attached patch that uses GEOM_FUNC_PREFIX for Transform() in the backend.

I can't see where GEOSGeometry.getquoted() is ever used, and I'm reluctant to add GEOM_FUNC_PREFIX because it'll then couple GEOS to the postgis backend (I use geos on non-postgis machines because it's so damn handy). Surely if it is needed (it may be a leftover remnant?) it should be part of the backend, not put into the geometry objects?

10/11/07 16:46:45 changed by jbronn

  • stage changed from Unreviewed to Accepted.

(in reply to: ↑ 1 ) 10/12/07 13:52:22 changed by jbronn

Replying to rcoup:

I can't see where GEOSGeometry.getquoted() is ever used, and I'm reluctant to add GEOM_FUNC_PREFIX because it'll then couple GEOS to the postgis backend

GEOSGeometry.getquoted() is only used by the psycopg2 adapter. When psycopg2 sees an object in its parameters (e.g., execute(sql, params)), it checks to see if it has the __conform__ method, and uses the getquoted routine for the quoting of the object for PostgreSQL.

I'm with you on the GEOS dependency issue -- I always attempt to keep the GEOS module as loosely coupled as possible. I will most likely place the import in a try/except to maintain this (nothing will be broken since it's only needed when used w/postgres).

10/23/07 16:42:57 changed by jbronn

  • needs_tests set to 1.

r6508 should fix this, but compatibility is not yet confirmed.

04/14/08 10:18:53 changed by jbronn

  • status changed from new to closed.
  • resolution set to wontfix.

GeoDjango should theoretically be compatible with PostGIS 1.1.0, but I do not have the time to test. As time marches on, this type of compatibility is less important as people migrate their installations to 1.2 and above (currently at 1.3.2). Thus, I won't fix this unless compelled otherwise.


Add/Change #5498 (GeoDjango not compatible with PostGIS 1.1.0)




Change Properties
Action