#34882 closed Bug (fixed)
options=0 is not respected when calling AsGeoJSON()
Reported by: | Denis Rouzaud | Owned by: | Denis Rouzaud |
---|---|---|---|
Component: | GIS | Version: | 4.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Change History (10)
comment:1 by , 14 months ago
Component: | Uncategorized → GIS |
---|---|
Has patch: | set |
Needs tests: | set |
Owner: | changed from | to
Status: | new → assigned |
Summary: | Options are not respected when calling contrib.gis.db.models.functions.AsGeoJSON → options=0 is not respected when calling AsGeoJSON() |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:3 by , 14 months ago
Owner: | changed from | to
---|
comment:4 by , 14 months ago
Owner: | changed from | to
---|
Umang, please don't reassign tickets that have not been abandoned.
comment:5 by , 14 months ago
Owner: | changed from | to
---|
comment:6 by , 14 months ago
Needs tests: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
Good catch. Please add a regression test.
PR