[GRASS-SVN] r73437 - grass/branches/releasebranch_7_2/lib/python/pygrass/vector

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 27 10:53:52 PDT 2018


Author: lucadelu
Date: 2018-09-27 10:53:52 -0700 (Thu, 27 Sep 2018)
New Revision: 73437

Modified:
   grass/branches/releasebranch_7_2/lib/python/pygrass/vector/geometry.py
Log:
pygrass: backported centroid typo, see #2881

Modified: grass/branches/releasebranch_7_2/lib/python/pygrass/vector/geometry.py
===================================================================
--- grass/branches/releasebranch_7_2/lib/python/pygrass/vector/geometry.py	2018-09-27 17:52:28 UTC (rev 73436)
+++ grass/branches/releasebranch_7_2/lib/python/pygrass/vector/geometry.py	2018-09-27 17:53:52 UTC (rev 73437)
@@ -1373,13 +1373,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()
 
     ..
@@ -1400,7 +1400,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