From dc824e2668fbb4ca753182e743fc5f11192500a7 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 8 Apr 2021 09:31:16 +0200 Subject: [PATCH] Refs #27488 -- Corrected detection of IsValid() support on SpatiaLite. LWGEOM is not required for IsValid(). --- django/contrib/gis/db/backends/spatialite/operations.py | 2 +- docs/ref/contrib/gis/db-api.txt | 4 ++-- docs/ref/contrib/gis/functions.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py index 1fc1cf20e01..8fd95d414ee 100644 --- a/django/contrib/gis/db/backends/spatialite/operations.py +++ b/django/contrib/gis/db/backends/spatialite/operations.py @@ -82,7 +82,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): def unsupported_functions(self): unsupported = {'BoundingCircle', 'GeometryDistance', 'MemSize'} if not self.lwgeom_version(): - unsupported |= {'Azimuth', 'GeoHash', 'IsValid', 'MakeValid'} + unsupported |= {'Azimuth', 'GeoHash', 'MakeValid'} return unsupported @cached_property diff --git a/docs/ref/contrib/gis/db-api.txt b/docs/ref/contrib/gis/db-api.txt index 928d12aa420..3bc85fd66e5 100644 --- a/docs/ref/contrib/gis/db-api.txt +++ b/docs/ref/contrib/gis/db-api.txt @@ -326,7 +326,7 @@ Lookup Type PostGIS Oracle MariaDB MySQL [#]_ Sp :lookup:`equals` X X X X X C :lookup:`exact ` X X X X X B :lookup:`intersects` X X X X X B -:lookup:`isvalid` X X X (≥ 5.7.5) X (LWGEOM) +:lookup:`isvalid` X X X (≥ 5.7.5) X :lookup:`overlaps` X X X X X B :lookup:`relate` X X X X C :lookup:`same_as` X X X X X B @@ -371,7 +371,7 @@ Function PostGIS Oracle MariaDB MySQL :class:`ForcePolygonCW` X X :class:`GeoHash` X X (≥ 5.7.5) X (LWGEOM) :class:`Intersection` X X X X X -:class:`IsValid` X X X (≥ 5.7.5) X (LWGEOM) +:class:`IsValid` X X X (≥ 5.7.5) X :class:`Length` X X X X X :class:`LineLocatePoint` X X :class:`MakeValid` X X (LWGEOM) diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index 9f7043c2b04..cf2c3217e41 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -374,7 +374,7 @@ intersection between them. *Availability*: `MySQL `__ (≥ 5.7.5), -`PostGIS `__, Oracle, SpatiaLite (LWGEOM) +`PostGIS `__, Oracle, SpatiaLite Accepts a geographic field or expression and tests if the value is well formed. Returns ``True`` if its value is a valid geometry and ``False`` otherwise.