summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-10-29 16:14:43 +0500
committerTim Graham <timograham@gmail.com>2015-10-29 10:31:50 -0400
commit6fb9424ff034b45cee3f16eafda3e4629545ce4f (patch)
treef8bf876e3bf65483a0b8fbfa297076ac31596ce8
parentd11f63ca92d99d710f50192de5a51545913e6914 (diff)
[1.9.x] Fixed #25631 -- Fixed support detection for some DB functions in SpatiaLite backend.
-rw-r--r--django/contrib/gis/db/backends/spatialite/operations.py6
-rw-r--r--docs/ref/contrib/gis/functions.txt6
2 files changed, 9 insertions, 3 deletions
diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
index 6dc5048b1b..127ea7b15d 100644
--- a/django/contrib/gis/db/backends/spatialite/operations.py
+++ b/django/contrib/gis/db/backends/spatialite/operations.py
@@ -93,6 +93,12 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
@cached_property
def unsupported_functions(self):
unsupported = {'BoundingCircle', 'ForceRHR', 'GeoHash', 'MemSize'}
+ if not self.gml:
+ unsupported.add('AsGML')
+ if not self.kml:
+ unsupported.add('AsKML')
+ if self.spatial_version < (3, 0, 0):
+ unsupported.add('AsGeoJSON')
if self.spatial_version < (3, 1, 0):
unsupported.add('SnapToGrid')
if self.spatial_version < (4, 0, 0):
diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt
index f6e8f5e497..d709696b37 100644
--- a/docs/ref/contrib/gis/functions.txt
+++ b/docs/ref/contrib/gis/functions.txt
@@ -52,7 +52,7 @@ AsGeoJSON
.. class:: AsGeoJSON(expression, bbox=False, crs=False, precision=8, **extra)
-*Availability*: PostGIS, SpatiaLite
+*Availability*: PostGIS, SpatiaLite (≥ 3.0)
Accepts a single geographic field or expression and returns a `GeoJSON
<http://geojson.org/>`_ representation of the geometry. Note that the result is
@@ -84,7 +84,7 @@ AsGML
.. class:: AsGML(expression, version=2, precision=8, **extra)
-*Availability*: Oracle, PostGIS, SpatiaLite
+*Availability*: Oracle, PostGIS, SpatiaLite (≥ 2.4.0-RC4)
Accepts a single geographic field or expression and returns a `Geographic Markup
Language (GML)`__ representation of the geometry.
@@ -115,7 +115,7 @@ AsKML
.. class:: AsKML(expression, precision=8, **extra)
-*Availability*: PostGIS, SpatiaLite
+*Availability*: PostGIS, SpatiaLite (≥ 2.4.0-RC4)
Accepts a single geographic field or expression and returns a `Keyhole Markup
Language (KML)`__ representation of the geometry.