1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

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

@@ -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``
=============