[GRASS-SVN] r73436 - grass/branches/releasebranch_7_4/lib/python/pygrass/vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 27 10:52:28 PDT 2018
Author: lucadelu
Date: 2018-09-27 10:52:28 -0700 (Thu, 27 Sep 2018)
New Revision: 73436
Modified:
grass/branches/releasebranch_7_4/lib/python/pygrass/vector/geometry.py
Log:
pygrass: backported centroid typo, see #2881
Modified: grass/branches/releasebranch_7_4/lib/python/pygrass/vector/geometry.py
===================================================================
--- grass/branches/releasebranch_7_4/lib/python/pygrass/vector/geometry.py 2018-09-27 02:54:33 UTC (rev 73435)
+++ grass/branches/releasebranch_7_4/lib/python/pygrass/vector/geometry.py 2018-09-27 17:52:28 UTC (rev 73436)
@@ -1377,13 +1377,13 @@
>>> centroid = Centroid(x=0, y=10)
>>> centroid
- Centoid(0.000000, 10.000000)
+ Centroid(0.000000, 10.000000)
>>> from grass.pygrass.vector import VectorTopo
>>> test_vect = VectorTopo(test_vector_name)
>>> test_vect.open(mode='r')
>>> centroid = Centroid(v_id=18, c_mapinfo=test_vect.c_mapinfo)
>>> centroid
- Centoid(3.500000, 3.500000)
+ Centroid(3.500000, 3.500000)
>>> test_vect.close()
..
@@ -1404,7 +1404,7 @@
#self.c_pline = ctypes.pointer(libvect.P_line()) if topology else None
def __repr__(self):
- return "Centoid(%s)" % ', '.join(['%f' % co for co in self.coords()])
+ return "Centroid(%s)" % ', '.join(['%f' % co for co in self.coords()])
@mapinfo_must_be_set
def _centroid_id(self):
More information about the grass-commit
mailing list