#35989: GeoJSON serializer producing invalid output (crs attribute)
---------------------------------+-----------------------------------------
Reporter: Jeremy Thompson | Type: Uncategorized
Status: new | Component: GIS
Version: 5.1 | 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
---------------------------------+-----------------------------------------
The built-in GeoJSON serializer is producing invalid GeoJSON. The
serialized output has a section like:
{{{
"crs": {"type": "name", "properties": {"name": "EPSG:4326"}}
}}}
However, according to the GeoJSON the `crs` attribute was removed from the
spec in August of 2016 (ref:
https://datatracker.ietf.org/doc/html/rfc7946#appendix-B.1)
This is causing issues when trying to use GeoJSON as the intermediary data
format for passing data to other libraries (e.g. Leaflet
https://leafletjs.com considers GeoJSON with the `crs` attribute as
invalid and fails to parse it).
More information in the forum discussion here:
https://forum.djangoproject.com/t/geojson-serializer-producing-invalid-
output-crs/37097
--
Ticket URL: <
https://code.djangoproject.com/ticket/35989>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.