[GRASS-SVN] r44953 - grass/trunk/lib/vector/rtree

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 11 12:58:36 EST 2011


Author: mmetz
Date: 2011-01-11 09:58:36 -0800 (Tue, 11 Jan 2011)
New Revision: 44953

Modified:
   grass/trunk/lib/vector/rtree/rect.c
Log:
cosmetics for t->ndims < NUMDIMS

Modified: grass/trunk/lib/vector/rtree/rect.c
===================================================================
--- grass/trunk/lib/vector/rtree/rect.c	2011-01-11 12:47:02 UTC (rev 44952)
+++ grass/trunk/lib/vector/rtree/rect.c	2011-01-11 17:58:36 UTC (rev 44953)
@@ -337,6 +337,14 @@
 	j = i + NUMDIMS;
 	new_rect.boundary[j] = MAX(r->boundary[j], rr->boundary[j]);
     }
+
+    /* set remaining boundaries to zero */
+    for (; i < NUMDIMS; i++) {
+	new_rect.boundary[i] = MIN(r->boundary[i], rr->boundary[i]);
+	j = i + NUMDIMS;
+	new_rect.boundary[j] = MAX(r->boundary[j], rr->boundary[j]);
+    }
+
     return new_rect;
 }
 



More information about the grass-commit mailing list