Skip to content

Commit 4eaa092

Browse files
committed
edits
1 parent 2bb8ebf commit 4eaa092

File tree

3 files changed

+23
-61
lines changed

3 files changed

+23
-61
lines changed

.github/workflows/test-python-atlas-geo.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

django_mongodb_backend/gis/adapter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ class Adapter(collections.UserDict):
66

77
def __init__(self, obj, geography=False):
88
"""
9-
Initialize on the spatial object.
9+
Initialize on the spatial object per
10+
https://www.mongodb.com/docs/manual/reference/geojson/.
1011
"""
1112
if obj.__class__.__name__ == "GeometryCollection":
1213
self.data = {

docs/source/ref/contrib/gis.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ GeoDjango
66

77
Django MongoDB Backend supports :doc:`GeoDjango<django:ref/contrib/gis/index>`.
88

9+
Each model field stores data as :doc:`GeoJSON objects <manual:reference/geojson>`.
10+
11+
* :class:`~django.contrib.gis.db.models.PointField`
12+
* :class:`~django.contrib.gis.db.models.LineStringField`
13+
* :class:`~django.contrib.gis.db.models.PolygonField`
14+
* :class:`~django.contrib.gis.db.models.MultiPointField`
15+
* :class:`~django.contrib.gis.db.models.MultiLineStringField`
16+
* :class:`~django.contrib.gis.db.models.MultiPolygonField`
17+
* :class:`~django.contrib.gis.db.models.GeometryCollectionField`
18+
19+
All fields have a :doc:`2dsphere index
20+
<manual:core/indexes/index-types/geospatial/2dsphere>` created on them.
21+
22+
The :ref:`geospatial aggregation stage <geospatial-operators>` only supports one
23+
operator: :doc:`$geoNear <manual:reference/operator/aggregation/geoNear>`. You can use
24+
it :meth:`.raw_aggregate` queries.
25+
26+
The :ref:`geospatial query operators <manual:geospatial-query-operators>` aren't
27+
supported.
28+
929
Configuration
1030
=============
1131

@@ -20,7 +40,7 @@ Limitations
2040

2141
- MongoDB doesn't support any spatial reference system identifiers
2242
(:attr:`BaseSpatialField.srid <django.contrib.gis.db.models.BaseSpatialField.srid>`)
23-
besides 4326 (WGS84) .
43+
besides `4326 (WGS84) <https://spatialreference.org/ref/epsg/4326/>`_.
2444
- None of the :doc:`GIS QuerySet APIs <django:ref/contrib/gis/geoquerysets>` (lookups,
2545
aggregates, and database functions) are supported.
2646
- :class:`~django.contrib.gis.db.models.RasterField` isn't supported.

0 commit comments

Comments
 (0)