drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

Unexpected id: query behavior #683

Closed Zaczero closed 1 year ago

Zaczero commented 1 year ago

Context:

Now the funny part begins:

nw(id:1144246456,4892888216) returns just the node

https://overpass-turbo.eu/s/1ruz

way(id:1144246456,4892888216) returns nothing

https://overpass-turbo.eu/s/1ruB

way(id:4892888216) returns corrupted? data

https://overpass-turbo.eu/s/1ruD

image


I did test it over multiple instances and they all share the similar behavior.

drolbr commented 1 year ago

Thank you for reporting the issue. I con confirm the problem.

drolbr commented 1 year ago

Fixed in 7cc7a2b6ea318cf7545435fd4bc8b456cc7f7d83

Zaczero commented 1 year ago

Fixed, Thanks !!

mmd-osm commented 1 year ago

By the way, I never quite understood why combinations of different object types are permitted in the first place. After all, object ids for nodes, ways and relations don't share a common number sequence, hence filters like nw(id:1144246456,4892888216) don't make much sense to me. I would simply reject them.

JOSM uses a object type prefix for each id, so that the multi object query is unambiguous: w1234,r567,n123,n234.

Zaczero commented 1 year ago

I think it's just for convenience reasons. I quite like it.