drolbr / Overpass-API

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

Some areas show a large amount of repeated tags #699

Closed mmd-osm closed 10 months ago

mmd-osm commented 11 months ago

In particular for large areas, I've noticed that the query examples below return a fairly large amount of identical k=v pairs. I'm not exactly clear when this started to happen. At least one kumi.systems instance running on Overpass API 0.7.59 e21c39fe already showed the bug.

Example 1:

is_in(41.1100114129846,-98.86948585510254);
out;

Example 2:

area(3600148838);
out;

Result:

  <area id="3600148838">
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
    <tag k="ISO3166-1" v="US"/>
[...]

On overpass-api.de, the query returns about 130'000 tags, on kumi.systems, even more than 700'000 tags for one area. Expected result would be around 350 tags.

drolbr commented 10 months ago

I can confirm the issue.

drolbr commented 10 months ago

Fixed in 4133829eb7c03619b82e09df846855450b2207eb

mmd-osm commented 10 months ago

Thank you for the fix. I would assume that the incorrect area entries will fix themselves after some time. Nevertheless, would you recommend some manual cleanup activity in this case, like re-creating areas from scratch?

drolbr commented 10 months ago

I have re-created the areas on gall and lambert because not all tags get fixed otherwise. Also, recreating areas from scratch there was 40 minutes or so, so not really a long downtime to get past this bug.