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

INTERSECTS does not respond correctly with geometry with an inner ring #664

Closed
mblackgeo opened this issue Nov 11, 2022 · 5 comments
Closed

Comments

@mblackgeo
Copy link

mblackgeo commented Nov 11, 2022

Describe the bug
Technically a duplicate of #241, but I am still seeing incorrect behavior when running INTERSECTS using a geometry with an inner ring. Consider this example below, where the lines 1,2,3,4 are stored in Tile38 and the query is being run using the green polygon:

image

INTERSECTS matches lines 1, 2, 3, and 4. This is incorrect as line 2 does not intersect. For reference WITHIN only returns line 4, as expected.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
Expected that INTERSECTS would only return 1,3,4 in the result.

Operating System:

  • OS: Linux
  • CPU: Intel
  • Version: 1.29.1
  • Container: Docker

Additional context
Originally raised in #241.

@iwpnd
Copy link
Contributor

iwpnd commented Nov 11, 2022

Hey @mblackgeo

You are correct. It appears to only check an intersection with the polygon exterior ring as linestring in those cases.

@tidwall
Copy link
Owner

tidwall commented Nov 11, 2022

@mblackgeo I pushed a hot fix moments ago. Thanks for reporting.
@iwpnd Thanks for finding the where it's happening.

@iwpnd
Copy link
Contributor

iwpnd commented Nov 11, 2022

🫡

@tidwall
Copy link
Owner

tidwall commented Nov 11, 2022

ref: tidwall/geojson@5d24577

@mblackgeo
Copy link
Author

Thanks for fixing and releasing this so quickly 💯 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants