[1.9.x] Fixed #25631 -- Fixed support detection for some DB functions in SpatiaLite backend.

This commit is contained in:
Sergey Fedoseev 2015-10-29 16:14:43 +05:00 committed by Tim Graham
parent d11f63ca92
commit 6fb9424ff0
2 changed files with 9 additions and 3 deletions

View File

@ -93,6 +93,12 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
@cached_property @cached_property
def unsupported_functions(self): def unsupported_functions(self):
unsupported = {'BoundingCircle', 'ForceRHR', 'GeoHash', 'MemSize'} 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): if self.spatial_version < (3, 1, 0):
unsupported.add('SnapToGrid') unsupported.add('SnapToGrid')
if self.spatial_version < (4, 0, 0): if self.spatial_version < (4, 0, 0):

View File

@ -52,7 +52,7 @@ AsGeoJSON
.. class:: AsGeoJSON(expression, bbox=False, crs=False, precision=8, **extra) .. 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 Accepts a single geographic field or expression and returns a `GeoJSON
<http://geojson.org/>`_ representation of the geometry. Note that the result is <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) .. 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 Accepts a single geographic field or expression and returns a `Geographic Markup
Language (GML)`__ representation of the geometry. Language (GML)`__ representation of the geometry.
@ -115,7 +115,7 @@ AsKML
.. class:: AsKML(expression, precision=8, **extra) .. 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 Accepts a single geographic field or expression and returns a `Keyhole Markup
Language (KML)`__ representation of the geometry. Language (KML)`__ representation of the geometry.