Adds tests for CONTAINMENT_OVERLAPPING_BBOX and fixes the out-of-bounds write when using bbox overlap on a one-vertex polygon
Adds a simpler version of this test case and fixes CONTAINMENT_OVERLAPPING results for polygons outside of the normal lat/lng range. The issue here was the test for cell-contains-polygon, which used latLngToCell - this function will return results for out-of-bounds input, presumably wrapping around the sphere, but because the rest of the logic (including the estimator) in polygonToCells is using cartesian coords, these false positives were unexpected. I updated this to include a bbox check first, which will exclude polygons with all points outside of the normal range.
coverage: 98.827% (-0.002%) from 98.829%
when pulling a260cfa577a85b28a94cc7de4849b4a92d707de8 on nrabinowitz:bbox-overlap-tests
into b57df8b6a01df7f70f76117ee058829613712057 on uber:master.
More follow-up for #800:
CONTAINMENT_OVERLAPPING_BBOX
and fixes the out-of-bounds write when using bbox overlap on a one-vertex polygonCONTAINMENT_OVERLAPPING
results for polygons outside of the normal lat/lng range. The issue here was the test for cell-contains-polygon, which usedlatLngToCell
- this function will return results for out-of-bounds input, presumably wrapping around the sphere, but because the rest of the logic (including the estimator) inpolygonToCells
is using cartesian coords, these false positives were unexpected. I updated this to include a bbox check first, which will exclude polygons with all points outside of the normal range.