[GRASS-SVN] r66078 - grass/trunk/lib/python/pygrass/vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 1 06:26:41 PDT 2015
Author: huhabla
Date: 2015-09-01 06:26:41 -0700 (Tue, 01 Sep 2015)
New Revision: 66078
Modified:
grass/trunk/lib/python/pygrass/vector/__init__.py
Log:
pygrass vector: Added simple area.centroid test
Modified: grass/trunk/lib/python/pygrass/vector/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/__init__.py 2015-09-01 13:26:08 UTC (rev 66077)
+++ grass/trunk/lib/python/pygrass/vector/__init__.py 2015-09-01 13:26:41 UTC (rev 66078)
@@ -396,8 +396,16 @@
Area(1) 12.0
Area(2) 8.0
Area(4) 8.0
+
+ >>> areas = [area for area in test_vect.viter('areas')]
+ >>> for area in areas:
+ ... print(area.centroid().cat)
+ 3
+ 3
+ 3
+ 3
+
>>> test_vect.close()
-
"""
if vtype in _GEOOBJ.keys():
if _GEOOBJ[vtype] is not None:
More information about the grass-commit
mailing list