watmildon / TIGERMap

A map showing OSM roadways needing review
https://watmildon.github.io/TIGERMap/
Apache License 2.0
6 stars 4 forks source link

Unknown building type marks a libarary #36

Open openbrian opened 1 month ago

openbrian commented 1 month ago

Love this new map! I've been hunting down building with unknown types in my neighborhood, so this map will be very useful.

However it marks a few known amenities as buildings with unknown types. Here's an example library https://iandees.github.io/TIGERMap/docs/WorldMap/?filter=building%253Dyes#map=17.83/38.827673/-77.06088

I've been using this query to find buildings with unknown types.

/*
unknown buildings 2

This has been generated by the overpass-turbo wizard.
The original search was:
“building”
*/
[out:xml]/*fixed by auto repair*/[timeout:25];
// gather results
(
  // query part for: “building”
  way
    ["building"]
    ["building"!~"^(apartments|boat_storage|college|commercial|construction|detached|garage|hospital|house|industrial|office|residential|retail|roof|school|semidetached_house|service|shed|terrace|toilets)$"]
    [!amenity]
    [!leisure]
    [!man_made]
    [!shop]
  ({{bbox}});
);
// print results
out meta;/*fixed by auto repair*/
>;
out meta qt;/*fixed by auto repair*/

It's based on similar rules from StreetComplete.

https://github.com/streetcomplete/StreetComplete/blob/7c04687816c9e455ccedce7858f61cb0d59b6d5d/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/AddBuildingType.kt#L13

watmildon commented 1 month ago

The filter box doesn't support regex but does support multi tag statements. You can get most of the way there by doing building=yes;!amenity;!shop.

watmildon commented 1 month ago

It occurs to me you can get the full regex in there if you break it into a bunch of !building=apartments statements.