Ticket #2775 (closed enhancement: fixed)
Shapefile reading ignores in-geometry bounding box
|Reported by:||crschmidt||Owned by:||warmerdam|
The shapefile layer ignores the in-.shp geometry bounding box, meaning that calculating the bounds is an expensive operation -- especially for large polygons, where "orgnaizePolygon" needs to be called, with expensive point-in-polygon checks for inner/outer status by default.
Since Shapefiles have the bbox information built in, it would be helpful for cases where there is no .qix file to use this information, since it saves the more expensive check.
Another case that this helps accelerate is the case where there is a large filter in the root node of the spatial index (/.qix) file: In that case, *all* queries require the full organize polygon call in GetNextFeature?, because it is part of reading the geometry from the shapefile. The end result is that all queries against a layer -- even ones which intersect no features at all -- may take a long time, because every iteration of the layer has the expensive polygon organizing code called.
(Filed at the request of FrankW.)