[Django] #34882: Options are not respected when calling contrib.gis.db.models.functions.AsGeoJSON

1 view
Skip to first unread message

Django

unread,
Sep 29, 2023, 3:42:32 AM9/29/23
to django-...@googlegroups.com
#34882: Options are not respected when calling
contrib.gis.db.models.functions.AsGeoJSON
-----------------------------------------+------------------------
Reporter: 3nids | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
When calling AssGeoJSON, if `bbox` and `crs` are both `false`, then
`options = 0`, there fore not added to the expression. See [0].

In Postgis [1], with geometries, the default is not 0 but 8, meaning the
CRS is returned, not respecting the original call arguments.


[0]
https://github.com/django/django/blob/6ad0dbc8d90ef37731608f7ac3d6e1d62cc8c765/django/contrib/gis/db/models/functions.py#L198
[1] https://postgis.net/docs/ST_AsGeoJSON.html

--
Ticket URL: <https://code.djangoproject.com/ticket/34882>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages