Browse Source

Add as option if the memory occupied by the spatial index must be release or not

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55990 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 12 năm trước cách đây
mục cha
commit
71d60df7aa
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      lib/python/pygrass/vector/__init__.py

+ 7 - 0
lib/python/pygrass/vector/__init__.py

@@ -468,3 +468,10 @@ class VectorTopo(Vector):
         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()