jts
jts copied to clipboard
Implement `YStripesPointInAreaLocator`
A faster point-in-area locator.
- Uses the technique described here: https://github.com/tidwall/tg/blob/main/docs/POLYGON_INDEXING.md#ystripes
- Faster than
IndexedPointInAreaLocator(4x+ in my various tests). - Passes all
AbstractPointInRingTesttests.
It's packaged such that the core polygon algo (YStripesPointInPolygonLocator) is defined in its own non-public class, then the Area variant constructs PolygonLocators for each Polygon in a Geometry, indexed via an STRtree.
The name could be changed too. Of course this too is an indexed PointInAreaLocator, but that exact name is taken.