summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-09-29 11:01:08 +0200
committerClaude Paroz <claude@2xlibre.net>2012-09-29 11:22:28 +0200
commit2f6e00a840176f95c836f25a41cc1a7d31941ba5 (patch)
tree984fec48d634557a83d09e61259f67177a38178d /docs
parent15d355d79dc26fb150776e6e019b2f667e4cb2ff (diff)
Fixed #11948 -- Added interpolate and project linear referencing methods
Thanks novalis for the report and the initial patch, and Anssi Kääriäinen and Justin Bronn for the review.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/gis/geos.txt25
-rw-r--r--docs/releases/1.5.txt14
2 files changed, 37 insertions, 2 deletions
diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt
index b569a74fe3..88883784f9 100644
--- a/docs/ref/contrib/gis/geos.txt
+++ b/docs/ref/contrib/gis/geos.txt
@@ -416,11 +416,36 @@ quarter circle (defaults is 8).
Returns a :class:`GEOSGeometry` representing the points making up this
geometry that do not make up other.
+.. method:: GEOSGeometry.interpolate(distance)
+.. method:: GEOSGeometry.interpolate_normalized(distance)
+
+.. versionadded:: 1.5
+
+Given a distance (float), returns the point (or closest point) within the
+geometry (:class:`LineString` or :class:`MultiLineString`) at that distance.
+The normalized version takes the distance as a float between 0 (origin) and 1
+(endpoint).
+
+Reverse of :meth:`GEOSGeometry.project`.
+
.. method:: GEOSGeometry:intersection(other)
Returns a :class:`GEOSGeometry` representing the points shared by this
geometry and other.
+.. method:: GEOSGeometry.project(point)
+.. method:: GEOSGeometry.project_normalized(point)
+
+.. versionadded:: 1.5
+
+Returns the distance (float) from the origin of the geometry
+(:class:`LineString` or :class:`MultiLineString`) to the point projected on the
+geometry (that is to a point of the line the closest to the given point).
+The normalized version returns the distance as a float between 0 (origin) and 1
+(endpoint).
+
+Reverse of :meth:`GEOSGeometry.interpolate`.
+
.. method:: GEOSGeometry.relate(other)
Returns the DE-9IM intersection matrix (a string) representing the
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index 5636a2b34b..294ceb159e 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -103,10 +103,22 @@ associated with proxy models.
New ``view`` variable in class-based views context
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
In all :doc:`generic class-based views </topics/class-based-views/index>`
(or any class-based view inheriting from ``ContextMixin``), the context dictionary
contains a ``view`` variable that points to the ``View`` instance.
+GeoDjango
+~~~~~~~~~
+
+* :class:`~django.contrib.gis.geos.LineString` and
+ :class:`~django.contrib.gis.geos.MultiLineString` GEOS objects now support the
+ :meth:`~django.contrib.gis.geos.GEOSGeometry.interpolate()` and
+ :meth:`~django.contrib.gis.geos.GEOSGeometry.project()` methods
+ (so-called linear referencing).
+
+* Support for GDAL < 1.5 has been dropped.
+
Minor features
~~~~~~~~~~~~~~
@@ -379,8 +391,6 @@ on the form.
Miscellaneous
~~~~~~~~~~~~~
-* GeoDjango dropped support for GDAL < 1.5
-
* :func:`~django.utils.http.int_to_base36` properly raises a :exc:`TypeError`
instead of :exc:`ValueError` for non-integer inputs.