[mapserver-commits] r11804 - branches/branch-6-0/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Jun 8 07:30:02 EDT 2011
Author: tamas
Date: 2011-06-08 04:30:02 -0700 (Wed, 08 Jun 2011)
New Revision: 11804
Modified:
branches/branch-6-0/mapserver/HISTORY.TXT
branches/branch-6-0/mapserver/mapcluster.c
Log:
Fix for the cluster processing if the shape bounds doesn't overlap with the given extent (#3913)
Modified: branches/branch-6-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-6-0/mapserver/HISTORY.TXT 2011-06-08 11:26:14 UTC (rev 11803)
+++ branches/branch-6-0/mapserver/HISTORY.TXT 2011-06-08 11:30:02 UTC (rev 11804)
@@ -15,6 +15,9 @@
Version 6.0.1 (SVN branch-6-0):
---------------------------
+- Fix for the cluster processing if the shape bounds doesn't overlap
+ with the given extent (#3913)
+
- OGC Filter: fix segfault when a ows_varname_type or wfs_varname_type is
defined but not a gml_varname_type (#3902)
Modified: branches/branch-6-0/mapserver/mapcluster.c
===================================================================
--- branches/branch-6-0/mapserver/mapcluster.c 2011-06-08 11:26:14 UTC (rev 11803)
+++ branches/branch-6-0/mapserver/mapcluster.c 2011-06-08 11:30:02 UTC (rev 11804)
@@ -1062,9 +1062,16 @@
current->bounds.maxx = current->x + maxDistanceX;
current->bounds.maxy = current->y + maxDistanceY;
- current->x = current->shape.bounds.minx;
- current->y = current->shape.bounds.miny;
+ /* if the shape doesn't overlap we must skip it to avoid further issues */
+ if(!msRectOverlap(&searchrect, ¤t->bounds))
+ {
+ msFreeShape(¤t->shape);
+ msInitShape(¤t->shape);
+ msDebug("Skipping an invalid shape falling outside of the given extent\n");
+ continue;
+ }
+
/* construct the item array */
if (layer->iteminfo)
BuildFeatureAttributes(layer, layerinfo, ¤t->shape);
More information about the mapserver-commits
mailing list