Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreparedLineStringDistance.isWithinDistance fails for containing polygons #960

Closed
dr-jts opened this issue Sep 17, 2023 · 0 comments · Fixed by #959
Closed

PreparedLineStringDistance.isWithinDistance fails for containing polygons #960

dr-jts opened this issue Sep 17, 2023 · 0 comments · Fixed by #959
Labels

Comments

@dr-jts
Copy link
Contributor

dr-jts commented Sep 17, 2023

As a follow-on to #958, PreparedLineStringDistance.isWithinDistance (and hence GEOSPreparedDistanceWithin) does not work for LineStrings when the test geometry is a Polygon which contains the indexed line(s). This is because the PreparedLineStringDistance.isWithinDistance does not check if the test geometry contains any points of the indexed geometry.

Here's a test case:

template<>
template<>
void object::test<13>
()
{
    checkDistanceWithin(
        "LINESTRING (30 30, 70 70)",
        "POLYGON ((0 100, 100 100, 100 0, 0 0, 0 100))",
        1,
        1
    );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant