Closed vvoovv closed 3 years ago
I observed, that the facet facades (blue arrows) in _manhattan01.osm get correctly classified as front facades. They are not excluded due to their angles in the condition at line 50 in facade_classification.py, because the condition visInfo.numMostlyPerpWaySegments >= 2
is True. But their sight value edgeSight is larger than the threshold FrontFacadeSight, so that they get classified as front facades, like all the other facades, that meet the angle condition.
However, the condition in line 72, originally intended for this special case, is not used for these facet facades, but produces wrong classifications (red arrows) on other edges. If we remove (comment) lines 72-74 delivers correct results for all edges, in my opinion.
I don't know, where your examples above is made from, but I assume, these wrong classifications would be correct too.
I commented the code at _action/facadeclassification.py to treat the corner facades. Yes, it solved the problem of corner facades in _manhattan01.osm. It also solved the problem from the first message (_berlin_karl_marxallee.osm, marked on the image below along with the corner facade).
However a corner facade in _berlin_karl_marxallee.osm isn't classified correctly.
I refactored the classification code and tried another approach for these corner facades. The algorithm works as follows:
This is still your idea of looking at the angles of the way-segments, but from another perspective. It seems to solve all issues with these corner facades we had until now. The new code is committed.
The method works perfectly. But what if there are more then one corner facades or what if the corner part has the form of an arc?
I'll close the issue till we encounter an example for that cases.
It requires fine tuning. I'll investigate it.