[python-shapely] 35/148: Backported fixes from 1.2.3 manual
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Thu Aug 20 17:42:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository python-shapely.
commit 5ad0bc828b3105c663a3c9e85372d34f2ad64503
Author: Pietro Battiston <me at pietrobattiston.it>
Date: Tue Sep 14 18:30:08 2010 +0200
Backported fixes from 1.2.3 manual
---
docs/manual.txt | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/docs/manual.txt b/docs/manual.txt
index de2ec5b..8ee83be 100644
--- a/docs/manual.txt
+++ b/docs/manual.txt
@@ -1366,8 +1366,8 @@ Figure 1. Convex hull (blue) of 2 points (left) and of 6 points (right).
.. attribute:: object.envelope
- Returns a representation of the point or smallest rectangular polygon that
- contains the object.
+ Returns a representation of the point or smallest rectangular polygon (with
+ sides parallel to the coordinate axes) that contains the object.
.. sourcecode:: pycon
@@ -1501,7 +1501,7 @@ first use the :func:`prepared.prep` function.
.. sourcecode:: pycon
>>> from shapely.geometry import Point
- >>> from shapely.prepared import polyprep
+ >>> from shapely.prepared import prep
>>> points = [...] # large list of points
>>> polygon = Point(0.0, 0.0).buffer(1.0)
>>> prepared_polygon = prep(polygon)
@@ -1514,6 +1514,26 @@ Prepared geometries instances have the following methods: ``contains``,
same arguments and usage as their counterparts in non-prepared geometric
objects.
+Diagnostics
+-----------
+
+.. function:: validation.explain_validity(ob):
+
+ Returns a string explaining the validity or invalidity of the object.
+
+ `New in version 1.2.1`.
+
+The messages may or may not have a representation of a problem point that can
+be parsed out.
+
+.. sourcecode:: python
+
+ >>> coords = [(0, 0), (0, 2), (1, 1), (2, 2), (2, 0), (1, 1), (0, 0)]
+ >>> p = Polygon(coords)
+ >>> from shapely.validation import explain_validity
+ >>> explain_validity(p)
+ 'Ring Self-intersection[1 1]'
+
Interoperation
==============
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-shapely.git
More information about the Pkg-grass-devel
mailing list