[GRASS-SVN] r54012 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 24 09:22:25 PST 2012


Author: mmetz
Date: 2012-11-24 09:22:24 -0800 (Sat, 24 Nov 2012)
New Revision: 54012

Modified:
   grass/trunk/lib/vector/Vlib/open.c
Log:
Vlib: open old sidx in file mode

Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c	2012-11-24 13:18:35 UTC (rev 54011)
+++ grass/trunk/lib/vector/Vlib/open.c	2012-11-24 17:22:24 UTC (rev 54012)
@@ -1056,6 +1056,14 @@
         /* initialize spatial index */
         Plus->Spidx_new = FALSE;
 
+	if (mode == 0) {
+            /* free old indices */
+            dig_spidx_free(Plus);
+            /* initialize file based indices */
+            Plus->Spidx_file = 1;
+            dig_spidx_init(Plus);
+	}
+
         /* load head */
         if (dig_Rd_spidx_head(&(Plus->spidx_fp), Plus) == -1) {
             fclose(Plus->spidx_fp.file);



More information about the grass-commit mailing list