[GRASS-SVN] r55990 - grass/trunk/lib/python/pygrass/vector

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 25 02:15:34 PDT 2013


Author: zarch
Date: 2013-04-25 02:15:33 -0700 (Thu, 25 Apr 2013)
New Revision: 55990

Modified:
   grass/trunk/lib/python/pygrass/vector/__init__.py
Log:
Add as option if the memory occupied by the spatial index must be release or not

Modified: grass/trunk/lib/python/pygrass/vector/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/__init__.py	2013-04-25 06:27:52 UTC (rev 55989)
+++ grass/trunk/lib/python/pygrass/vector/__init__.py	2013-04-25 09:15:33 UTC (rev 55990)
@@ -468,3 +468,10 @@
         if libvect.Vect_get_map_box(self.c_mapinfo, bbox.c_bbox) == 0:
             raise GrassError("I can not find the Bbox.")
         return bbox
+
+    def close(self, release=True):
+        """Close the VectorTopo map, if release is True, the memory
+        occupied by spatial index is released"""
+        if release:
+            libvect.Vect_set_release_support(self.c_mapinfo)
+        super(VectorTopo, self).close()



More information about the grass-commit mailing list