1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #35989 -- Removed crs from GeoJSON serializer.

Specification of coordinate reference systems (crs) was removed from the GeoJSON spec in 2016.
https://datatracker.ietf.org/doc/html/rfc7946#appendix-B.1
This commit is contained in:
Jeremy Thompson
2024-12-09 12:55:27 -05:00
committed by Sarah Boyce
parent 5e998d717f
commit 918e7a2c76
3 changed files with 3 additions and 6 deletions

View File

@@ -25,11 +25,7 @@ class Serializer(JSONSerializer):
def start_serialization(self):
self._init_options()
self._cts = {} # cache of CoordTransform's
self.stream.write(
'{"type": "FeatureCollection", '
'"crs": {"type": "name", "properties": {"name": "EPSG:%d"}},'
' "features": [' % self.srid
)
self.stream.write('{"type": "FeatureCollection", "features": [')
def end_serialization(self):
self.stream.write("]}")