Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ public Object visit(BBOX filter, Object data) {
if(filter instanceof BBoxImpl<?> impl) {
if(impl.getGeometry() != null && (data instanceof Polygon || data instanceof GeometryCollection)) {
Geometry input = (Geometry) data;
try {
return impl.getGeometry().intersection(input);
}
catch(Exception e) {
// buffer is expensive to fix invalid geometry, call it only if needed
return impl.getGeometry().intersection(input.buffer(0.0));
}
// buffer is expensive but turns out it is faster in most case by doing it instead of using try catch
// try {
// return impl.getGeometry().intersection(input);
// }
// catch(Exception e) {
// return impl.getGeometry().intersection(input.buffer(0.0));
//}
return impl.getGeometry().intersection(input.buffer(0.0));
}
else {
return data;
Expand Down