Forráskód Böngészése

pygrass: vector, revert https://trac.osgeo.org/grass/changeset/62034, add points to the _NUMOF dictionary and fix doctests examples

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65953 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 9 éve
szülő
commit
4b48a7d5f6
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      lib/python/pygrass/vector/__init__.py

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

@@ -24,6 +24,7 @@ _NUMOF = {"areas": libvect.Vect_get_num_areas,
           "holes": libvect.Vect_get_num_holes,
           "holes": libvect.Vect_get_num_holes,
           "islands": libvect.Vect_get_num_islands,
           "islands": libvect.Vect_get_num_islands,
           "kernels": libvect.Vect_get_num_kernels,
           "kernels": libvect.Vect_get_num_kernels,
+          "points": libvect.Vect_get_num_lines,
           "lines": libvect.Vect_get_num_lines,
           "lines": libvect.Vect_get_num_lines,
           "nodes": libvect.Vect_get_num_nodes,
           "nodes": libvect.Vect_get_num_nodes,
           "updated_lines": libvect.Vect_get_num_updated_lines,
           "updated_lines": libvect.Vect_get_num_updated_lines,
@@ -239,7 +240,7 @@ class VectorTopo(Vector):
     Open a vector map using the *with statement*: ::
     Open a vector map using the *with statement*: ::
 
 
         >>> with VectorTopo('schools', mode='r') as schools:
         >>> with VectorTopo('schools', mode='r') as schools:
-        ...     for school in schools[:3]:
+        ...     for school in schools[:4]:
         ...         print school.attrs['NAMESHORT']
         ...         print school.attrs['NAMESHORT']
         ...
         ...
         SWIFT CREEK
         SWIFT CREEK
@@ -263,7 +264,7 @@ class VectorTopo(Vector):
 
 
             >>> cens = VectorTopo('census')
             >>> cens = VectorTopo('census')
             >>> cens.open(mode='r')
             >>> cens.open(mode='r')
-            >>> cens[:3]
+            >>> cens[:4]
             [Boundary(v_id=1), Boundary(v_id=2), Boundary(v_id=3)]
             [Boundary(v_id=1), Boundary(v_id=2), Boundary(v_id=3)]
             >>> cens.close()
             >>> cens.close()