Added SpatiaLite NumPoints support for non-LINESTRING geometries.
This commit is contained in:
parent
1c3ddc0d27
commit
875aebdb2c
|
@ -6,8 +6,6 @@ from django.utils.functional import cached_property
|
|||
|
||||
class DatabaseFeatures(BaseSpatialFeatures, SQLiteDatabaseFeatures):
|
||||
supports_3d_storage = True
|
||||
# SpatiaLite can only count vertices in LineStrings
|
||||
supports_num_points_poly = False
|
||||
|
||||
@cached_property
|
||||
def supports_initspatialmetadata_in_one_transaction(self):
|
||||
|
|
|
@ -83,6 +83,7 @@ class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
|
|||
def function_names(self):
|
||||
return {
|
||||
'Length': 'ST_Length',
|
||||
'NumPoints': 'ST_NPoints',
|
||||
'Reverse': 'ST_Reverse',
|
||||
'Scale': 'ScaleCoords',
|
||||
'Translate': 'ST_Translate',
|
||||
|
|
|
@ -392,7 +392,13 @@ or ``MULTI*`` field); otherwise returns ``None``.
|
|||
Oracle, SpatiaLite
|
||||
|
||||
Accepts a single geographic field or expression and returns the number of points
|
||||
in the first linestring in the geometry field; otherwise returns ``None``.
|
||||
in a geometry.
|
||||
|
||||
On MySQL, returns ``None`` for any non-``LINESTRING`` geometry.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
SpatiaLite support for non-``LINESTRING`` geometries was added.
|
||||
|
||||
``Perimeter``
|
||||
=============
|
||||
|
|
Loading…
Reference in New Issue