prochitecture / blosm

GNU General Public License v3.0
11 stars 3 forks source link

Strange back facade in bern_old_town.osm #11

Open vvoovv opened 3 years ago

vvoovv commented 3 years ago

image

image

polarkernel commented 3 years ago

The value for edgeSight is 0.49597, just below the threshold of 0.5 to get a front facade. Its way-segment has a lot of quite near facades, which makes its average distance low. Maybe we leave this threshold for a moment and collect other examples before we screw at this parameter.

vvoovv commented 3 years ago

Another example is just across the street from the back facade in the first message. Both side and back facades should be classified as the front ones.

image

polarkernel commented 3 years ago

Another example is just across the street from the back facade in the first message. Both side and back facades should be classified as the front ones.

These two facades are not classified as front facades due to the angle weight in edgeSight computation, similar to corner facades (see issue #14). But here we can't use similar considerations. We could try to relax the angle restriction by extending the angle weight and allow a broader range of angles. For instance the weight could be set to one until 45° and to start the restriction there (red line):

But then, many other facades also get classified as front facades, for instance in bern_old_town.osm the facades pointed to by cyan arrows in the follwing image:

Such changes are delicate. You may try yourself and see whether you agree with the result by replacing the line 50 in _facadeclassification.py by the follwoing three lines:

                pseudoAngle = visInfo.dx/(visInfo.dx+visInfo.dy) * 2.
                angleWeight = pseudoAngle if pseudoAngle < 1. else 1.
                edgeSight = visInfo.value * angleWeight  * visInfo.waySegment.avgDist/visInfo.distance