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

is_in does not find surrounding areas for some input sets containing redundant nodes #736

Open
Ecumenopolis opened this issue Aug 14, 2024 · 2 comments
Labels

Comments

@Ecumenopolis
Copy link

Example:

Nodes 151615580 and 151591244 have the same coordinates in Tekamah, Nebraska.

These two query return the same output set, consisting of one closed way and seven areas.

node(id:151615580); is_in; out ids;
node(id:151591244); is_in; out ids;

But if they are both in the input set, the output set contain only the way -- the relation-based areas aren't found.

node(id:151615580,151591244); is_in; out ids;

@mmd-osm
Copy link
Contributor

mmd-osm commented Aug 18, 2024

This seems to be caused by two nodes having exactly the same coordinates. Using some close by nodes returns the expected result.

node(id:151591244,133114675);is_in; out ids;

https://github.com/drolbr/Overpass-API/blob/master/src/overpass_api/statements/coord_query.cc#L188-L194 might need some additional logic to remove these duplicates.

Entries are removed by: https://github.com/drolbr/Overpass-API/blob/master/src/overpass_api/statements/coord_query.cc#L297

Removing duplicate lat/lon values would help. Maybe there's a better way to fix it.

image

@drolbr drolbr added the bug label Nov 3, 2024
@drolbr
Copy link
Owner

drolbr commented Nov 3, 2024

Thank you for reporting this bug.

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

No branches or pull requests

3 participants