Fixed #12410 -- Added LineLocatePoint GIS function.

This commit is contained in:
Sergey Fedoseev 2017-04-02 00:02:09 +05:00 committed by Tim Graham
parent 7b53041420
commit ede4f6d48c
9 changed files with 38 additions and 7 deletions

View file

@ -386,6 +386,7 @@ Function PostGIS Oracle MySQL Spat
:class:`Intersection` X X X (≥ 5.6.1) X
:class:`IsValid` X X X (≥ 5.7.5) X (LWGEOM)
:class:`Length` X X X X
:class:`LineLocatePoint` X X
:class:`MakeValid` X X (LWGEOM)
:class:`MemSize` X
:class:`NumGeometries` X X X X

View file

@ -358,6 +358,19 @@ resource-intensive) with the ``spheroid`` keyword argument.
In older versions, a raw value was returned on MySQL when used on
projected SRS.
``LineLocatePoint``
===================
.. class:: LineLocatePoint(linestring, point, **extra)
.. versionadded:: 2.0
*Availability*: `PostGIS <https://postgis.net/docs/ST_LineLocatePoint.html>`__,
SpatiaLite
Returns a float between 0 and 1 representing the location of the closest point on
``linestring`` to the given ``point``, as a fraction of the 2D line length.
``MakeValid``
=============

View file

@ -68,6 +68,9 @@ Minor features
:class:`~django.contrib.gis.db.models.functions.IsValid` function, and
:lookup:`isvalid` lookup.
* Added the :class:`~django.contrib.gis.db.models.functions.LineLocatePoint`
function, supported on PostGIS and SpatiaLite.
:mod:`django.contrib.messages`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~