There may be a further performance improvement available for PreparedGeometry predicates, for situations where a test geometry is wholly inside or outside the prepared target. This situation would seem to be relatively common - an example would be checking small parcel polygons against much larger jurisdiction boundaries.
The optimization is in the segment-intersection phase of the test chain. It's possible to first test the *envelope* of the test (B) geometry against the target (A) segment index, to see if the envelope intersects any segment. If no segment-envelope intersection is found, this provides a fast negative result for intersects, and a fast positive result for contains and covers. I'll put this in the queue to prototype and metric in JTS. I'm putting it out here in case someone wants to try this out in GEOS/PostGIS to test it against some real-world workloads. My current thinking for implementation is to enhance FastSegmentSetIntersectionFinder to provide a boolean intersects(Envelope) method. In turn this requires extensions to MonotoneChainOverlapAction and possibly some other classes. Feedback welcome.
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel