Opened 3 months ago

Last modified 2 months ago

#37215 assigned New feature

Geography field should accept SRID other than 4326 on PostGIS

Reported by: Djonathan Owned by: Djonathan
Component: GIS Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Djonathan)

Since version 2.2 PostGIS accepts any geographic SRID with the geography type, but django still has a check to prevent it. It would be nice to remove this restriction from Django.

PostGIS documentation confirming this:
​https://postgis.net/docs/manual-3.1/postgis_usage.html#PostGIS_Geography:~:text=Prior%20to%20PostGIS%202.2

Django restriction:
​https://github.com/django/django/blob/main/django/contrib/gis/db/backends/postgis/operations.py#L263

I can work on this if accepted.

Change History (4)

comment:1 by Djonathan, 3 months ago

Description: modified (diff)

comment:2 by Jacob Walls, 3 months ago

Owner: set to Djonathan
Status: new → assigned
Summary: Geography should accept SRID other than 4326 → Geography field should accept SRID other than 4326 on PostGIS
Triage Stage: Unreviewed → Accepted

Thanks for offering a PR.

comment:4 by David Smith, 2 months ago

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top