You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given two lines where the subset is at least 3 vertices in from the endpoints of the larger line, GEOSPreparedDistanceWithin returns false when querying the subset line against the larger line, whereas GEOSDistanceWithin returns true.
The problem is the incorrect heuristic check in IndexedFacetDistance.isWithinDistancehere.
auto env2 = g->getEnvelope();
if (distance(env2.get()) > maxDistance) {
return false;
}
The check attempts to short-circuit the withinDistance test by checking the distance to the envelope polygon of the tested geometry. However, IndexedFacetDistance only computes distances to linework, not to polygonal geometries. So the test is incorrect in some cases (such as the failing case).
Given two lines where the subset is at least 3 vertices in from the endpoints of the larger line, GEOSPreparedDistanceWithin returns false when querying the subset line against the larger line, whereas GEOSDistanceWithin returns true.
Example using Shapely 2.0:
First observed in shapely #1887 using GEOS
main
(3.13.0dev), Shapelymain
, on MacOS.The text was updated successfully, but these errors were encountered: