[geos-devel] Performance improvement in Prepared predicates?

Martin Davis mtnclimb at gmail.com
Mon Jun 24 11:55:39 PDT 2019


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20190624/4ab44e49/attachment.html>


More information about the geos-devel mailing list