Opened 5 years ago

Closed 5 years ago

#31695 closed New feature (duplicate)

GDAL 3 axis order causes inconsistency in geodjango api and breaks geometry calculations

Reported by: Ryan Burt Owned by: nobody
Component: GIS Version: 3.1
Severity: Normal Keywords: gdal 3
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

GDAL 3 has changed the default order of coordinates to (latitude, longitude): https://gdal.org/tutorials/osr_api_tut.html#crs-and-axis-order
Consequently, geometry fields are saved in the spatial database as (latitude, longitude) whereas the expected order is (longitude, latitude).

Any geospatial calculation performed on a queryset also expects the coordinates to be in (longtiude, latitude), but as they are not saved in this format, the calculations results are incorrect and cause a variety of problems.

Extra support for GDAL 3 is required such that insert order of coordinates for saving geometry fields matches what the database expects.

Tested with django 3.0.7 against gdal 3.0.4, gdal 3.1.0, and gdal 2.4.3.

Change History (1)

comment:1 by Mariusz Felisiak, 5 years ago

Resolution: duplicate
Status: newclosed
Type: BugNew feature
Version: 3.03.1

Django 3.0 doesn't support GDAL 3. Duplicate of #30678.

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