[gdal-dev] SetSpatialFilter geometry filtering vs bbox filtering

Michael Smith michael.smith.erdc at gmail.com
Thu Jan 29 14:20:46 PST 2026


I was looking at the doxygen docs for SetSpatialFilter and saw a sentence that surprised me:

https://gdal.org/en/stable/doxygen/classOGRLayer.html#ac37397c0deda981082cb32dcd25c85d9

Currently this test is may be inaccurately implemented, but it is guaranteed that all features whose envelope (as returned by https://gdal.org/en/stable/doxygen/classOGRGeometry.html#aa3d42b06ae6f7bbef6d1a2886da8d398) overlaps the envelope of the spatial filter will be returned. This can result in more shapes being returned that should strictly be the case.

Is this the case, is it just filtering based on geometry envelopes and not a strict intersection?


-- 

Michael Smith 
RSGIS Center – ERDC CRREL NH 
US Army Corps 








More information about the gdal-dev mailing list