mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #25874 -- Made GEOSGeometry read SRID from GeoJSON input.
This commit is contained in:
committed by
Tim Graham
parent
ede4f6d48c
commit
24023c6a8f
@@ -224,9 +224,18 @@ Format Input Type
|
||||
WKT / EWKT ``str``
|
||||
HEX / HEXEWKB ``str``
|
||||
WKB / EWKB ``buffer``
|
||||
GeoJSON ``str``
|
||||
GeoJSON_ ``str``
|
||||
======================= ==========
|
||||
|
||||
For the GeoJSON format, the SRID is set based on the ``crs`` member. If ``crs``
|
||||
isn't provided, the SRID defaults to 4326.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
In older versions, SRID isn't set for geometries initialized from GeoJSON.
|
||||
|
||||
.. _GeoJSON: https://tools.ietf.org/html/rfc7946
|
||||
|
||||
.. classmethod:: GEOSGeometry.from_gml(gml_string)
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
@@ -71,6 +71,9 @@ Minor features
|
||||
* Added the :class:`~django.contrib.gis.db.models.functions.LineLocatePoint`
|
||||
function, supported on PostGIS and SpatiaLite.
|
||||
|
||||
* Any :class:`~django.contrib.gis.geos.GEOSGeometry` imported from GeoJSON now
|
||||
has its SRID set.
|
||||
|
||||
:mod:`django.contrib.messages`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user