1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #25836 -- Added support for MakeLine aggregate on SpatiaLite.

This commit is contained in:
Sergey Fedoseev
2015-12-01 08:08:41 +05:00
committed by Tim Graham
parent d3b488f5bd
commit 0825f77f76
5 changed files with 12 additions and 9 deletions

View File

@@ -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'
@@ -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 {
@@ -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.