Loading django/contrib/gis/db/backends/spatialite/operations.py +3 −5 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): intersection = 'Intersection' kml = 'AsKML' length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword makeline = 'MakeLine' num_geom = 'NumGeometries' num_points = 'NumPoints' point_on_surface = 'PointOnSurface' Loading Loading @@ -80,6 +81,8 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): 'distance_lte': SpatialOperator(func='Distance', op='<='), } disallowed_aggregates = (aggregates.Extent3D,) @cached_property def function_names(self): return { Loading Loading @@ -114,11 +117,6 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 3.0.0 and above.') return version @cached_property def disallowed_aggregates(self): disallowed = (aggregates.Extent3D, aggregates.MakeLine) return disallowed def convert_extent(self, box, srid): """ Convert the polygon data received from Spatialite to min/max values. Loading docs/ref/contrib/gis/db-api.txt +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ Aggregate PostGIS Oracle SpatiaLite :class:`Collect` X X :class:`Extent` X X X :class:`Extent3D` X :class:`MakeLine` X :class:`MakeLine` X X :class:`Union` X X X ======================= ======= ====== ========== Loading docs/ref/contrib/gis/geoquerysets.txt +5 −1 Original line number Diff line number Diff line Loading @@ -1297,11 +1297,15 @@ Example:: .. class:: MakeLine(geo_field) *Availability*: PostGIS *Availability*: PostGIS, SpatiaLite Returns a ``LineString`` constructed from the point field geometries in the ``QuerySet``. Currently, ordering the queryset has no effect. .. versionchanged:: 1.10 SpatiaLite support was added. Example:: >>> print(City.objects.filter(name__in=('Houston', 'Dallas') Loading docs/releases/1.10.txt +3 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ Minor features :attr:`~django.contrib.gis.gdal.GDALBand.mean` and :attr:`~django.contrib.gis.gdal.GDALBand.std` attributes. * Added support for the :class:`~django.contrib.gis.db.models.MakeLine` aggregate on SpatiaLite. :mod:`django.contrib.messages` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Loading tests/gis_tests/geoapp/tests.py +0 −2 Original line number Diff line number Diff line Loading @@ -652,8 +652,6 @@ class GeoQuerySetTest(TestCase): Testing the `MakeLine` aggregate. """ if not connection.features.supports_make_line_aggr: # Only PostGIS has support for the MakeLine aggregate. For other # backends, test that NotImplementedError is raised self.assertRaises( NotImplementedError, City.objects.all().aggregate, MakeLine('point') Loading Loading
django/contrib/gis/db/backends/spatialite/operations.py +3 −5 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): intersection = 'Intersection' kml = 'AsKML' length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword makeline = 'MakeLine' num_geom = 'NumGeometries' num_points = 'NumPoints' point_on_surface = 'PointOnSurface' Loading Loading @@ -80,6 +81,8 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): 'distance_lte': SpatialOperator(func='Distance', op='<='), } disallowed_aggregates = (aggregates.Extent3D,) @cached_property def function_names(self): return { Loading Loading @@ -114,11 +117,6 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations): raise ImproperlyConfigured('GeoDjango only supports SpatiaLite versions 3.0.0 and above.') return version @cached_property def disallowed_aggregates(self): disallowed = (aggregates.Extent3D, aggregates.MakeLine) return disallowed def convert_extent(self, box, srid): """ Convert the polygon data received from Spatialite to min/max values. Loading
docs/ref/contrib/gis/db-api.txt +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ Aggregate PostGIS Oracle SpatiaLite :class:`Collect` X X :class:`Extent` X X X :class:`Extent3D` X :class:`MakeLine` X :class:`MakeLine` X X :class:`Union` X X X ======================= ======= ====== ========== Loading
docs/ref/contrib/gis/geoquerysets.txt +5 −1 Original line number Diff line number Diff line Loading @@ -1297,11 +1297,15 @@ Example:: .. class:: MakeLine(geo_field) *Availability*: PostGIS *Availability*: PostGIS, SpatiaLite Returns a ``LineString`` constructed from the point field geometries in the ``QuerySet``. Currently, ordering the queryset has no effect. .. versionchanged:: 1.10 SpatiaLite support was added. Example:: >>> print(City.objects.filter(name__in=('Houston', 'Dallas') Loading
docs/releases/1.10.txt +3 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ Minor features :attr:`~django.contrib.gis.gdal.GDALBand.mean` and :attr:`~django.contrib.gis.gdal.GDALBand.std` attributes. * Added support for the :class:`~django.contrib.gis.db.models.MakeLine` aggregate on SpatiaLite. :mod:`django.contrib.messages` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Loading
tests/gis_tests/geoapp/tests.py +0 −2 Original line number Diff line number Diff line Loading @@ -652,8 +652,6 @@ class GeoQuerySetTest(TestCase): Testing the `MakeLine` aggregate. """ if not connection.features.supports_make_line_aggr: # Only PostGIS has support for the MakeLine aggregate. For other # backends, test that NotImplementedError is raised self.assertRaises( NotImplementedError, City.objects.all().aggregate, MakeLine('point') Loading