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

Remove buildings from AddHousenumber if addressed entrance exists #885

Closed
britiger opened this issue Feb 20, 2018 · 21 comments
Closed

Remove buildings from AddHousenumber if addressed entrance exists #885

britiger opened this issue Feb 20, 2018 · 21 comments
Assignees
Labels

Comments

@britiger
Copy link

It would be helpful to remove buildings from AddHousenumber-Quest if the buildung already have several addresses as Nodes on the way of the Building. Mostly they are mapped as entrance=* with complete addr:= Some buildings have doors to different streets with different names of the streets. If you have blocks of flats, sometime with entrance on backside or anywhere else it is usefull to put the address not on the complete building.
Sample: https://www.openstreetmap.org/way/48916730

@westnordost
Copy link
Member

This is already the case since the quest was first implemented.

@westnordost westnordost added the feedback required more info is needed, issue will be likely closed if it is not provided label Feb 20, 2018
@britiger
Copy link
Author

Here was added a housenumber: https://www.openstreetmap.org/changeset/56437830
The entrance-Node exists since 7 Month: https://www.openstreetmap.org/node/4163739078

@westnordost
Copy link
Member

Hmm, I cannot explain why this wasn't excluded then. I will investigate.

@westnordost westnordost added bug and removed feedback required more info is needed, issue will be likely closed if it is not provided labels Feb 20, 2018
@westnordost
Copy link
Member

westnordost commented Feb 20, 2018

For the initial building you linked, the quest does not show up. It would be a great help to reproduce this issue if someone could find an example where the quest shows up.

Edit: I went through the code again and I can't see anything wrong there. Help in finding another example of a wrongly shown quest is highly appreciated.

Perhaps we could also remove the housenumber from the building mentioned by @britiger again to hopefully be able to reproduce this issue. @britiger do you think this is OK?

@westnordost westnordost added the help wanted help by contributors is appreciated; might be a good first contribution for first-timers label Feb 20, 2018
@DeusFigendi
Copy link

I'm just guessing, but maybe the problem is, that the entrace-node is not ony part of the building but also of the parking lot in the east.

@westnordost
Copy link
Member

That should not be a problem. StreetComplete does a point-in-polygon (or outline) check.

@westnordost
Copy link
Member

So I removed the address information from the building to reproduce this issue, but I can't reproduce it. The housenumber quest does not show for that building.

@britiger
Copy link
Author

britiger commented Feb 21, 2018

I've found a example in my 4.0 beta2:

Have a quest for: https://www.openstreetmap.org/way/26242308
This one of the addresses node within the building polygon: https://www.openstreetmap.org/node/3661893704

photo_2018-02-21_17-18-59

@matkoniecz
Copy link
Member

This one of the addresses node within the building polygon: https://www.openstreetmap.org/node/3661893704

It may or may not be related but I opened this are in edit mode and this building is invisible in iD, but it appears in current overpass querries - see http://overpass-turbo.eu/s/wmM

Maybe it is viable to blame it on a database corruption that occurred as you fetched quests, and that it is an overpass bug - not a SC bug?

@westnordost
Copy link
Member

westnordost commented Feb 21, 2018

It isn't invisible for me in iD.

id-invis

But with my StreetComplete installation (v4.0-beta2), I can not reproduce it. The quest is not shown:

device-2018-02-21-181737

So, of course StreetComplete trusts Overpass in that it will get all the elements it asked for.

Right now, the only possibility how I see this could happen is if Overpass did not return all the address-nodes as response to the query.

@matkoniecz
Copy link
Member

It isn't invisible for me in iD.

Now it is OK also for me.

@britiger
Copy link
Author

I only had the building I mentioned as quest. After reload quests in this area I now have the two building of your screenshot. May it was some cached data, how long does the app hold data in cache? I've reloaded the data in an area in Potsdam before I took the screenshot. But using the history of both objects I've seen that the building including the node within the building was added in 2015. You have mentioned that the check exists in first implementation. Very curious bug.

@britiger
Copy link
Author

Now I've found a second building nearby: https://www.openstreetmap.org/way/397490707
Address: https://www.openstreetmap.org/way/397490707 both created 2016.

After searching for new quests it's also gone away like the first building. So I think it is a problem with my cache. But I can reproduce the error:

  • I remove cache, all data and settings for the application
  • Login again with my osm user
  • Setting only quest with addresses
  • I moved to https://www.openstreetmap.org/way/26242308 loading quests in this area
    • Only see the two buildings of your screenshot => OK
  • Now moving to https://www.openstreetmap.org/way/397490707
    • the quest for this building is visible after a while without loading data (maybe automatic load)
  • After loading new quests the quest was removed

@westnordost
Copy link
Member

westnordost commented Feb 21, 2018

the quest for this building is visible after a while without loading data (maybe automatic load)

I don't understand. How can the quest for the building be visible after you cleared all data for the application but before loading new quests is finished?

Edit: The linked way https://www.openstreetmap.org/way/397490707 also has an interesting changeset message "Hunderte von doppelten Hausnummern. Offenbar ein StreetComplete-Problem, welches die vorhandenen Nummern nicht erkennt". So, the problem turned up already 5 months ago, but was not reported. :-(

@britiger
Copy link
Author

britiger commented Feb 21, 2018

I've checked it on a second device with fresh installed app and on the first again.
Here the steps in short:

I've take screenrecord: https://streamable.com/hvonc

I also used Android Studio to capture some logs while verify the behaviour on second device:

  • load at 26242308 (added wrong quest)
  • 2nd load at 397490707 (remove wrong quest):
02-21 21:08:56.156 15736-16671/de.westnordost.streetcomplete I/QuestDownload: (13.0517578125,52.36218321674426,13.07373046875,52.40241887397332) Starting
02-21 21:08:56.708 15736-16671/de.westnordost.streetcomplete I/QuestDownload: Successfully added 0 new and removed 0 closed notes (0 of 0 notes are hidden)
02-21 21:09:01.403 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddRoadName: Added 0 new and removed 0 already resolved quests. (Total: 0) in 4607ms
02-21 21:09:16.198 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddHousenumber: Added 1 new and removed 0 already resolved quests. (Total: 1) in 14695ms
02-21 21:09:23.494 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddRecyclingType: Added 0 new and removed 0 already resolved quests. (Total: 0) in 7220ms
02-21 21:09:29.423 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddRoadSurface: Added 0 new and removed 0 already resolved quests. (Total: 0) in 5838ms
02-21 21:09:29.460 15736-16671/de.westnordost.streetcomplete I/QuestDownload: (13.0517578125,52.36218321674426,13.07373046875,52.40241887397332) Finished
02-21 21:09:40.855 15736-16671/de.westnordost.streetcomplete I/QuestDownload: (13.0517578125,52.36218321674426,13.095703125,52.38901106223455) Starting
02-21 21:09:41.388 15736-16671/de.westnordost.streetcomplete I/QuestDownload: Successfully added 0 new and removed 6 closed notes (6 of 6 notes are hidden)
02-21 21:09:47.018 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddRoadName: Added 0 new and removed 0 already resolved quests. (Total: 0) in 5568ms
02-21 21:10:08.556 15736-15747/de.westnordost.streetcomplete I/art: Background sticky concurrent mark sweep GC freed 100042(3MB) AllocSpace objects, 0(0B) LOS objects, 23% free, 9MB/12MB, paused 752us total 111.490ms
02-21 21:10:08.874 15736-15747/de.westnordost.streetcomplete I/art: Background partial concurrent mark sweep GC freed 145441(4MB) AllocSpace objects, 6(3MB) LOS objects, 43% free, 5MB/9MB, paused 1.248ms total 109.597ms
02-21 21:10:11.423 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddHousenumber: Added 0 new and removed 1 already resolved quests. (Total: 0) in 24285ms
02-21 21:10:14.567 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddRecyclingType: Added 0 new and removed 0 already resolved quests. (Total: 0) in 3094ms
02-21 21:10:18.961 15736-16671/de.westnordost.streetcomplete I/QuestDownload: AddRoadSurface: Added 0 new and removed 0 already resolved quests. (Total: 0) in 4290ms
02-21 21:10:19.001 15736-16671/de.westnordost.streetcomplete I/QuestDownload: (13.0517578125,52.36218321674426,13.095703125,52.38901106223455) Finished

EDIT: Changed Video URL

@rugk
Copy link
Contributor

rugk commented Feb 21, 2018

https://www.youtube.com/watch?v=9ZEcZUiZCdY&feature=youtu.be has been deleted, because it violates YouTube's TOS. 🙄 Try https://streamable.com/ if the video is short enough.

@britiger
Copy link
Author

I don't know why I was block but now I uploaded it here: https://streamable.com/hvonc

@westnordost
Copy link
Member

westnordost commented Feb 21, 2018

I've got it. The log was the part that helped :-)

@westnordost
Copy link
Member

building1

zoomed in...:

building2

@westnordost westnordost removed the help wanted help by contributors is appreciated; might be a good first contribution for first-timers label Feb 21, 2018
@westnordost westnordost self-assigned this Feb 21, 2018
@westnordost
Copy link
Member

westnordost commented Feb 24, 2018

Does anyone know if it is possible somehow to filter a result set in Overpass? I.e. to return all nodes of a building that have an addr:housenumber tag?

This does not work:

[bbox:{{bbox}}];
way[building];> -> .building_nodes;
building_nodes["addr:housenumber"] -> .addr_nodes;
out meta geom;

@westnordost
Copy link
Member

Nevermind, I got it

(
  way[building]({{bbox}});
  rel[building]({{bbox}});
) -> .buildings;

.buildings > -> .building_nodes;
node.building_nodes["addr:housenumber"];< -> .buildings_with_addr_nodes;

(.buildings; - .buildings_with_addr_nodes;);

out meta geom;

(Returns all buildings that have no address nodes on their outline, even if the address node itself is not inside the bbox)

westnordost added a commit that referenced this issue Feb 24, 2018
- exclude underground buildings from query (#907)
- exclude buildings with an address node within or on the outline, even if this node is outside of the to-be-downloaded bounding box (#885)
- already exclude buildings with an address node on their outline using a more complex overpass query, substantially increasing performance
- add integration tests for all the cases in which buildings should be excluded
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

5 participants