Opened 11 years ago

Closed 11 years ago

#21850 closed Bug (fixed)

Make GeometryField.geodetic() case insensitive

Reported by: olivergeorge@… Owned by: nobody
Component: GIS Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The current implementation is quite fragile with regards to case sensitivity. The proposed patch makes it operate in a case insensitive manner.

This became an issue while working on a spatial backend for Microsoft SQL Server. The WKT string they use capitalises the unit name (e.g. "Degree") which doesn't match any entries in the GeometryField.geodetic_units list. The default values don't follow a case convention making it hard to work around without a patch. Are

The proposed change makes two specific updates:

  • default values in GeometryField.geodetic_units are now all lower case
  • GeometryField.geodetic() to test against lower case unit name

https://github.com/django/django/pull/2195/files

Change History (1)

comment:1 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In a4fbdcdf660fe1f032a332fb51ad37104117b41f:

Fixed #21850 -- Made GeometryField.geodetic case insensitive

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