-
Notifications
You must be signed in to change notification settings - Fork 124
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
roof:ridge and rood:edge do not work properly when crossing building:part boundries #170
Comments
OSM2World/src/main/java/org/osm2world/core/world/modules/building/roof/ComplexRoof.java Line 228 in ddbcd9b
It seems to be the area.getOverlaps() function that is the culprit, but I could be wrong I do not fully understand your code.
|
The current code is written under the assumption that all r/e segments are completely contained within the building part polygon, yes. Is it valid for a ridge to cross a building part boundary? The documentation for ProposedRoofLines doesn't really say much on building parts, but as far as I can see, all of the examples have outlines fully enclosing the r/e segments. To change this assumption would probably involve at least:
At least in my own test (which may be subtly different from yours), getOverlaps did successfully detect the overlap between the ridge and both building parts, so that part of the code could stay as it currently is. Could you send me an .osm file so I can make sure? All in all, it could be done with a bit of effort; I'd say the priority of this fix depends on whether the community considers this valid mapping. (Even if it's not, it wouldn't hurt for OSM2World to be able to deal with it, of course.) Thanks for the very thorough illustrations by the way! :) |
Here is a file (fictional data) showing some of the issues, left building (with 1 floor) is virtually identical to what I was talking about above. In my opinion having the roof lines cross between As you can see with the last of the building, the correct way was different anyways and nothing crossed a |
Pre-note
When I mention r/e I mean
roof:ridge
/roof:edge
.I may not have explained the best here, seeing the Discord chat may help.
If you have any questions, ask away! I did have a look at the source code and can probably point to where the issue is if I have a longer look.
Images and explanation of issue
So if an r/e crosses over a
building:parts
edge, it gets ignored:Just making a node on the r/e where it intersects the change in
building:part
fixes the issue.Here is a helpful diagram: (this is on
dANW34V3R:master
iirc so it's slightly different to above, the r/e does appear in thebuilding:part
it started in, but not the others.On
tordnik:master
it doesn't appear in either)Part 1 of the above at a different angle:
How to fix
This appears to be an issue with the algorithm that detects whether a way is inside a building part, it doesn't always detect it if it only 1 node is inside of it/on it's edge.
If 2 nodes are inside the building part/on the edge it sees it fine, so it works if a node is on the boundary so both building parts see it.
Discussion of this issue happened on Discord
Here's a Discord link to the conversation, where there is probably better and more explained detail than here:
https://discordapp.com/channels/413070382636072960/429092644438802432/750146965597061140
(You need to be in the OSM World Discord for the link to work).
The text was updated successfully, but these errors were encountered: