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

Add quest to determine the type of a building #774

Closed
wants to merge 24 commits into from

Conversation

ENT8R
Copy link
Contributor

@ENT8R ENT8R commented Jan 15, 2018

I tried to finally fix #25 as this is one of the most wanted features for this app currently...
I am not sure if this is what you meant in the discussion...
It will look like this:

More building types can be added or removed on request 😄

@matkoniecz
Copy link
Member

matkoniecz commented Jan 16, 2018

Is it really "important data that is used by many data consumers"? Is it even used by any data consumers (except StreetComplete itself?).

I would move quest priority down to "5. may be shown as missing in QA tools".

As it is now it would block even AddHousenumber quest.

EDIT:

I have seen some uses of that, but very minor

One more serious use that I have seen is someone making flood preparation plans - and they were using OSM data to supplement official data.

Official data was outdated and based on construction permit, so was missing illegally build houses.

They were praising OSM data and mentioned that their problem was distinguishing houses from apartment buildings from industrial buildings or sheds. Here building would be useful (still not covering cases where building use changed and building form was preserved but that is tiny minority)

@matkoniecz
Copy link
Member

matkoniecz commented Jan 16, 2018

I think that farm_auxiliary value would be useful in rural regions (to avoid chicken coop tagged as barns). I may look for an image if that would help.

@matkoniecz
Copy link
Member

I think that app/src/main/res/authors.txt should be also updated - https://github.com/westnordost/StreetComplete/blob/master/app/src/main/res/authors.txt is useful in documenting sources of images.

@ENT8R
Copy link
Contributor Author

ENT8R commented Jan 16, 2018

I think that app/src/main/res/authors.txt should be also updated

Yepp, I already have all sources in a seperate text file but I forgot to add them... I will do this now!

Is it really "important data that is used by many data consumers"? Is it even used by any data consumers (except StreetComplete itself?).

I think you are right, maybe it is not important data that is used by many data consumers but for StreetComplete it is necessary to know what kind of building it is to display the housenumber quest. This is why I selected such a high importance... But it can of course be changed...

@matkoniecz
Copy link
Member

but for StreetComplete it is necessary to know what kind of building it is to display the housenumber quest

In situation where we have two buildings close to each other, one tagged building=house, second building=yes, both without address I would prefer SC to ask about houseumber before asking question that potentially may allow second housenumber.

Currently quest for chicken coop tagged as building=yes will get higher priority than house number quest where it is known that house number is missing.

@westnordost
Copy link
Member

Mh, I won't properly look at this PR for some time, as the feature is not planned until v5 and will stir up quite some trouble again.

From looking at it, I see a few issues here:

  1. Most importantly: You assume that every building can actually be determined to be defined as something more detailed than just building=yes. I am not so sure about that at all. But how to deal with this situation, I do not have a solution neither.
  2. You chose photos over pictograms. I am not sure if this is a good idea, can photos be so generic that they are clear for every country? I.e. schools can look very different from country to country and of course even within one country. Even now, from the photo, I would probably select "residential" for the typical "Mehrfamilienhäuser" (apartment houses) you find in towns, rather than what would be correct, "apartments".
  3. House and detached has the same picture.

@matkoniecz
Copy link
Member

matkoniecz commented Jan 17, 2018

You assume that every building can actually be determined to be defined as something more detailed than just building=yes

I think that it is true, building is a freeform value.

I looked in #25 (comment) at stats and 14 values covers more than 98,7% of cases (according to the current stats) with remaining values that are rare enough to be handled with notes or are invalid.

I think that looking later at notes and adding the most popular building types that are reported will allow to make 99,5%+ of buildings taggable directly in StreetComplete, other cases requiring a note.

After looking again at my list I would recommend adding support for some building values (farm_auxiliary, transportation) to this PR.

@matkoniecz
Copy link
Member

matkoniecz commented Jan 17, 2018

I merged this quest into my fork to test it, my initial comments:

I think that it would be desirable to provide explanation of difference between house, residential and apartments.

Is it OK to tag kindergarten as schools? If not, what should be used?

Maybe "explain XYZ" in can't say menu?

01-17 03:24:26.720 13218-13286/de.westnordost.streetcomplete.debug I/QuestDownload: AddBuildingType: Added 5031 new and removed 0 already resolved quests. (Total: 5031) in 21091ms

This quest is likely to expose/cause performance issues - either fixing them or limiting how many objects are downloaded may be necessary.

Either building=civic page ( https://wiki.openstreetmap.org/wiki/Tag:building%3Dcivic ) should be updated (if this tag is OK) or this value dropped from available.

@matkoniecz
Copy link
Member

It is not obvious that "church" answer should be used for building that were constructed as church and now are used as hotels/warehouses/whatever.

(with the same applying to other building values)

@rugk
Copy link
Contributor

rugk commented Jan 17, 2018

There are also places of worship? (As they tag it in osm, AFAIK)
So we may need more than churches?
If you only want to show the most common places of worship, or is clear we need country level data here.

Maybe we could also hide the other types in a long-tap, see #775.

@ENT8R
Copy link
Contributor Author

ENT8R commented Jan 17, 2018

Currently quest for chicken coop tagged as building=yes will get higher priority than house number quest where it is known that house number is missing.

That's true! As you proposed I reduced the priority to 5.


You chose photos over pictograms. I am not sure if this is a good idea, can photos be so generic that they are clear for every country?

Yes I know, pictograms are always better than photos... But the pictograms should be in the style of StreetComplete, shouldn't they? And I'm horrible at creating those pictograms...


House and detached has the same picture.

Maybe we can bypass this by removing detached from the quest because detached has nearly the same meaning as house... It is only a small refinement...


I think that it would be desirable to provide explanation of difference between house, residential and apartments.
[..]
Maybe "explain XYZ" in can't say menu?

Good idea! 👍


This quest is likely to expose/cause performance issues - either fixing them or limiting how many objects are downloaded may be necessary.

What do you think may be a good limit? About 500?

@westnordost
Copy link
Member

What do you think may be a good limit? About 500?

Don't bother.

@rugk
Copy link
Contributor

rugk commented Jan 17, 2018

Maybe we can bypass this by removing detached from the quest because detached has nearly the same meaning as house

Mhh, I'd say this would not be good. These buildings should be tagged correctly from the beginning (no one would look at the value later on to control it).

And describing/showing this case (in a pictogram) is quite easy as well.

@althio
Copy link
Contributor

althio commented Jan 18, 2018

@ENT8R thank you for tackling this 👍

Some feedback/suggestion:

  • It is a lot of values to choose from and the ordering (with straight taginfo #usage) is not logical for human
  • residential is a generic value/placeholder, which "contains" house/apartments/...
  • commercial is the plain tag, label could be Office
  • retail is the plain tag, label could be Shop/retail
  • garage and garages should be together
  • farm/agricultural sub-types should be together
  • the distinction house/detached can be dropped from my point of view, it is essentially meaningless in the current state of the database (even worse than the cobblestone/sett situation). For reference, the analysis of @bhousel for Localize walkthrough addresses openstreetmap/iD#3976 (comment)
  • other religious buildings should be included

@matkoniecz
Copy link
Member

residential is a generic value/placeholder, which "contains" house/apartments/...

And should stay to make also weird cases taggable.

retail is the plain tag, label could be Shop/retail

Is it improving anything?

@matkoniecz
Copy link
Member

commercial is the plain tag, label could be Office

I would consider adding building=office with "Office" label (not all offices are commercial and building=office seems to me better than building=commercial).

@althio
Copy link
Contributor

althio commented Jan 18, 2018

residential is a generic value/placeholder, which "contains" house/apartments/...

And should stay to make also weird cases taggable.

residential should stay (with added mention 'generic') and all residential-like values (house/apartments/...) should be together/on the same line

  • this is similar to surface=* ; paved (generic) ; asphalt/concrete/cobblestone/... (specific)

building=office with "Office" label (not all offices are commercial and building=office seems to me better than building=commercial)

building=office is marked as deprecated. i agree we need to somehow separate label for office, either public-civic or private-commercial and that is hard in a single quest:

building=commercial (+ office=)
building=civic (+ office=)
building=public (+ office=)

@esilja
Copy link
Contributor

esilja commented Jan 18, 2018

retail is the plain tag, label could be Shop/retail

Is it improving anything?

Shop is an easier word. I knew shop long before I knew what retail means, even today it wouldn't be in my active dictionary.

@matkoniecz
Copy link
Member

matkoniecz commented Jan 18, 2018

According to my test this quest after answering is never able to apply answers.

I created PR to fix this (after ENT8R accepts it it will become part of this PR): ENT8R#2

EDIT: PR merged in

adding building tag always collided with present building=yes
@matkoniecz
Copy link
Member

What you think about adding also farm_auxiliary value (to avoid chicken coop tagged as barns)?

@westnordost
Copy link
Member

Did you look at the reworked street surface quest yet? Would perhaps an idea for this quest as well.

@ENT8R
Copy link
Contributor Author

ENT8R commented Jan 20, 2018

Did you look at the reworked street surface quest yet? Would perhaps an idea for this quest as well.

I just tested it a few days ago... By using this QuestAnswerFragment one could select building=residential and then specify the exact building value like house or apartments. Is this what you mean?

@ENT8R
Copy link
Contributor Author

ENT8R commented Jan 21, 2018

Should the overpass query also search for nodes which are tagged as building=yes? Currently it searches only for ways...

@westnordost
Copy link
Member

westnordost commented Apr 24, 2018 via email

@matkoniecz
Copy link
Member

matkoniecz commented Apr 24, 2018

If surveyors spot an odd case (i.e. a church that is now an office building) and they are not sure, they'll leave a note.

I am pretty sure that with current question they would tag according to the current use (at least I would do this if I would be unaware how code works).

@RubenKelevra
Copy link
Contributor

@ENT8R well, my point was more: a value which is like a category should still show up as task for other users of SC to add a more fine selection. Most houses or apartment buildings are currently tagged as "residential". We don't fix those buildings when we choose to not include them in this quest.

Farm on the other hand is fine as a value for the main building where people live on a farmyard, according to the wiki - which sounds reasonable to me. Why do you think that's a category?

Religious buildings? I don't care IMHO. There most of the time already tagged with specialized tags and there are very few. All cities have more garages than religious buildings. :)


I still want to vote against the "detached" value even included here. The information have no real value to anybody, when added and there are nearly no uses. This looks like we blow up the complexity on the quest and the parsing for a redundant information:

If a building is detached can be determent by the shape of the building and the space between this building and others.

@ENT8R
Copy link
Contributor Author

ENT8R commented Apr 24, 2018

If a building is detached can be determent by the shape of the building and the space between this building and others.

Theoretically yes, but what if the area is bad mapped and a house which should be connected to another house is not connected...
But before we get off-topic here, I can simply remove this value if there are no other opinions and @westnordost also agrees. But @rugk also said in #774 (comment) that removing this value would not be a good idea...

We don't fix those buildings when we choose to not include them in this quest.

I would not include them in this quest because this would probably add too much complexity, but if it was accepted, this should be a new quest. The same was proposed by @matkoniecz for the surface quest in #279 to determine values like surface=paved/unpaved more specifically.

@rugk
Copy link
Contributor

rugk commented Apr 24, 2018

As for detached: I only knew iD has also a special icon or so. But maybe I confused something here, because on iD you also have "houses for multiple families" (in German: Mehrfamilienhäuser). I guess now they are tagged as apartments.
At least these and the "usual" ("single-familiy") houses must be differentiated. As you cannot do this from the shape, obviously. (who knows how many families live there in). If "detached" is really only about the information, it maybe really does not matter… But on the other hand, it should be easy to select/determinate for a StreetComplete user.
BTW these terms may also be good to use in this quest for the user, instead of potentially "technical terms" of OSM.

@RubenKelevra
Copy link
Contributor

RubenKelevra commented Apr 25, 2018

@rugk single-household and multi-household buildings are seperated, "house" and "appartments". I don't think we need a further seperation if the building shares a wall with a different building, when it's a single-household building. But if so, building=detached is still a bad tag design.

You can say: I will go to my appartment, you can say: I will go to my house, but you won't say: I go to my detached.

So it's actually not a real building type in my opinion, but a detail which we might want to collect, but with a subtag:
building=house + house:type=detached or house=detached.

The main idea is here to collect maybe even more values, like "Doppelhaushälfte" house:type=semi-detached and "Reihenhaus" house:type=terraced

@rugk
Copy link
Contributor

rugk commented Apr 25, 2018

So it seems that is a bad tag design, so actually an OSM problem. Maybe escalate it and your suggestion to the OSM wiki, mailing list or wherever it is appropriate. As for this quest, I think I know agree that detached does not have to be a separate selection for the user. (although it would not hurt/have any disadvantage, IMHO)

@westnordost
Copy link
Member

westnordost commented Apr 26, 2018

If I understand the description in the wiki correctly, the distinction between house and detached is that detached is supposed to be free-standing, usually with garden all around and all, while the house is part of a row of buildings while still being a one-family-home and not being a terraced building.
Some examples: Yangon, Hamburg, Washington

The picture from Washington shows according to Wikipedia "row houses" (=terrace), I would have tagged them as house though. So, to distinguish such a narrow definition of house from the other tags, is pretty difficult.

I agree that the difficulty with detached/house(/terrace) should be discussed on the wiki/mailing list/forum. For this, It is very important to analyze the actual usage of these tags and the wiki history, not just the current definition in the wiki. My suspicion is, that many users actually never used the detached tag for free-standing houses. This would mean that house then in practice became somewhat of a super-category, just like cobblestone for the surface key.
Still, there is a noticeable distinction between free-standing houses with gardens and houses in a street-row. I do not agree on the argument that it could be determined by a spatial analysis:

  1. there might be a garage, shed or extension on a detached house. This wouldn't make the detached house into a street-row-like house like in the examples I posted above
  2. we know from the experience with separately mapped cycleways and sidewalks how difficult it is to find out a spatial property like this

For StreetComplete however, it is only relevant whether the distinction can be conveyed to the user cleary in one or a few words.

@RubenKelevra
Copy link
Contributor

RubenKelevra commented Apr 27, 2018

@westnordost good point. I think we should discuss this in the osm community before going forward and add this feature at all. Since the tagging on this topic - which is basically like at least 50% of the buildings is a bit unclear.

I think if we add this feature, the special tags on buildings might explode, so better discuss it in advance than too late. :)

@ENT8R would you be so kind and start a thread somewhere to get some more users of OSM involved in this discussion?

@ENT8R
Copy link
Contributor Author

ENT8R commented Apr 27, 2018

Is the tagging mailing list the best to discuss something like this?

@RubenKelevra
Copy link
Contributor

@ENT8R So the answer was yes. That's the best place. :)

@rugk rugk mentioned this pull request May 5, 2018
@westnordost
Copy link
Member

Ok, I am kinda back from a little hiatus. Reasons for that included:

  • Played Witcher 3
  • Fantastic weather
  • The next thing to do on my list is this ticket and I'm not too motivated to draw all those icons and sort out problems with building definitions

The weather remains still a problem but maybe you can help with the latter. Can/should some tags maybe be left out? I.e. what's the difference between a hut and a cabin?

@matkoniecz
Copy link
Member

I considered making my own simplified version that is not bothering with tagging more detailed than building=residential - especially for older houses in the Old Town answering this in detail as proposed here requires ridiculous survey, as I have no idea whatever given building was originally used by single family, multiple families or is it certainly build as a residential building.

I thought about tagging building:use and changing address and roof quests to support building:use tag.

@westnordost
Copy link
Member

I think the following building types should be removed:

  • construction (a construction site is not a building, also it's good anyway to handle this via a note as it is highly temporary)
  • ruins (not a building, also quite rare)
  • college (I don't think the building type between a college and a school differ, really)
  • bungalow (it's a type of (detached) house, actually)
  • perhaps cabin (it's a type of small house (built of wood), actually
  • perhaps dormitory (often not visible from the outside, looks like apartment building, rare enough that people could leave notes)

@westnordost
Copy link
Member

westnordost commented May 28, 2018

Also, it may be worth a thought to include some man_made stuff. It may happen often that people who draw from satellite imagery just tag everything as building=yes first, even though it may be i.e. a silo or something in reality. Someone willing to look into what could be candidates for inclusion?
I bet that almost all stupas (chedis) are tagged as buildings currently.

@rugk
Copy link
Contributor

rugk commented May 29, 2018

college (I don't think the building type between a college and a school differ, really)

Actually the building type of schools in general is not really a typical one, they can have any building. Mostly the common thing should be that it is just standalone.

But of course the building tag does not only tag the outer appearance of a building, but to some extend also how it us used.

@westnordost
Copy link
Member

Taking this over, by the way. Perhaps I or @ENT8R should create a new PR to clear all the comments, it has gotten a bit long here.

In my commit yesterday, I...

  • added semidetached_house (=duplex/twin house) - it's used actually quite often already (75k times, +40k times as a subtag for house) and the definition is clear
  • removed cabin - definition unclear, not well defined what is the difference to bungalow (small holiday/garden/summer home or dacha), shed (small building for tools), hut (crude/simple shelter or dwelling)
  • added pagoda - as it is a well-defined, distinctive religious building that cannot be thrown into the temple pot
  • added man_made=storage_tank - used 260k+ times and a generic term for all kinds of different tanks (gasometer, fuel tank, silo, ...) with a meaningful subtag scheme
  • removed barn - a barn is used to store hay, tools and machinery and used sometimes as a workplace. However, it is usually not visible from the outside if any particular farm building is used as a barn or a cowshed, stable, pig farm, chicken farm etc etc. - thus, to avoid mistagging and thus burning the barn tag, users should just tag it with the general term, farm_auxiliary. (Change my mind)
  • added kindergarten - not because the architecture of one is particularly distinguishable from that of a school (or a college), but because at least it's easy to find out for the surveyor (by looking at the usage) and because it is disputable to tag kindergartens and colleges as "school buildings". Better tag would be `educational, but alas, this tag is not established
  • removed public - in the wiki definition, there is basically no distinction to civic, thus, the tag must be interpreted as synonymous to it. It is too late to establish a distinction now

Things to clear up (with the community), with which I could use some help:

  1. house / detached / semidetached_house / terrace: The discussion in this ticket so far and in iD ( Localize walkthrough addresses openstreetmap/iD#3976 (comment) ) made clear that at least the house tag can only be interpreted as a generic "single-family dwelling" while the others specify it more specifically. It would be in order to define a proper subtag for house, i.e. house=detached. This proposal involves deprecating (and bot-editing) the top-level house-tags and finding a reasonable subtag for a single-family dwelling that is not detached.
  2. administrative / government / government_office: The fact that the public tag is "burnt" in the way that it is not clearly distinguishable from civic arises the need for a tag that clearly defines a building as goverment-y / administrative (i.e. government offices should not be tagged as commercial, even though they are also just offices), which I guess was a bit the aim of public. There are several undocumented tags in widespread use. Someone would need to find out what for these are actually used, document it, and as second step, standardize it by deprecating the synonyms of the other.
  3. offices: Find out why the tag was actually deprecated and if the process was actually legit (not done by one person without prior discussion). To this day, the tag is still used 70k+ times and to me, the tag makes perfect sense, as commercial is the general term for anything commercial (quote: A building where non-specific commercial activities take place.), i.e. including cinemas, buildings in a theme park, casinos, clubs, bars, etc etc etc. - a non-deprecatedness of this tag would also solve the "it's an office, but a non-commercial office" problem from point 2.

@matkoniecz
Copy link
Member

@matkoniecz
Copy link
Member

I still think that there is major problem with asking about current usage, not original building purpose.

@ENT8R
Copy link
Contributor Author

ENT8R commented May 31, 2018

Taking this over, by the way.

Thank you! And BTW: the icons look amazing!

I will create a new PR now!

Edit: the new PR can be found at #1092

@westnordost
Copy link
Member

Thank you! And BTW: the icons look amazing!

Thanks, much appreciated :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback required more info is needed, issue will be likely closed if it is not provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quest for type of building