Quellcode durchsuchen

working on https://trac.osgeo.org/grass/ticket/2881, should it backport?

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72750 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi vor 7 Jahren
Ursprung
Commit
9f40d4aed4

+ 2 - 2
lib/python/pygrass/vector/__init__.py

@@ -510,11 +510,11 @@ class VectorTopo(Vector):
         >>> feature1.length()
         4.0
         >>> test_vect.read(-1)
-        Centoid(7.500000, 3.500000)
+        Centroid(7.500000, 3.500000)
         >>> len(test_vect)
         21
         >>> test_vect.read(21)
-        Centoid(7.500000, 3.500000)
+        Centroid(7.500000, 3.500000)
         >>> test_vect.read(22)                             #doctest: +ELLIPSIS
         Traceback (most recent call last):
           ...

+ 3 - 3
lib/python/pygrass/vector/find.py

@@ -227,8 +227,8 @@ class PointFinder(AbstractFinder):
             ...                                          type="centroid",
             ...                                          maxdist=1.5)
             >>> result                   #doctest: +NORMALIZE_WHITESPACE
-            [Centoid(2.500000, 2.500000),
-             Centoid(3.500000, 3.500000)]
+            [Centroid(2.500000, 2.500000),
+             Centroid(3.500000, 3.500000)]
 
             >>> test_vect.find_by_point.geos(point=Point(20,20), maxdist=0)
 
@@ -419,7 +419,7 @@ class BboxFinder(AbstractFinder):
              Boundary([Point(1.000000, 1.000000), Point(1.000000, 3.000000),
                        Point(3.000000, 3.000000), Point(3.000000, 1.000000),
                        Point(1.000000, 1.000000)]),
-             Centoid(2.500000, 2.500000)]
+             Centroid(2.500000, 2.500000)]
 
             >>> bbox = Bbox(north=5, south=-1, east=3, west=-1)
             >>> result = test_vect.find_by_bbox.geos(bbox=bbox,

+ 3 - 3
lib/python/pygrass/vector/geometry.py

@@ -1377,13 +1377,13 @@ class Centroid(Point):
 
         >>> 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 @@ class Centroid(Point):
         #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):