Commit 76c626a9 authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

Update of parameters documentation for roofs - and removing parameter BUILDING_SKEL_ROOFS.

parent 7d5f2b01
......@@ -600,8 +600,7 @@ class Building(object):
allow_complex_roofs = False
# Now lets see whether we can allow complex nevertheless when more than 4 corners
# a bit more relaxed, if we do skeleton roofs
if (parameters.BUILDING_SKEL_ROOFS and
self.nnodes_ground in range(4, parameters.BUILDING_SKEL_MAX_NODES)):
if self.nnodes_ground in range(4, parameters.BUILDING_SKEL_MAX_NODES):
allow_complex_roofs = True
# even more relaxed if it is a skillion
if self.roof_shape is RoofShape.skillion:
......@@ -849,7 +848,7 @@ class Building(object):
else:
# -- pitched roof for > 4 ground nodes
if self.nnodes_ground > 4 and parameters.BUILDING_SKEL_ROOFS:
if self.nnodes_ground > 4:
if self.roof_shape is RoofShape.skillion:
roofs.separate_skillion(ac_object, self)
elif self.roof_shape is RoofShape.pyramidal:
......
......@@ -127,6 +127,74 @@ LOD_PERCENTAGE_DETAIL Decimal 0.5 Of the rema
============================================= ======== ======= ==============================================================================
.. _chapter-parameters-roofs-label:
------------------
Roofs on Buildings
------------------
Below you will find quite a lot of parameters deciding what type of roofs should be generated on buildings. To understand the basic concepts, you should understand `OSM Simple 3D buildings`_. With ``complex roof`` below all those roof types, which are not flat/horizontal are meant.
The following parameters decide whether a complex roof should be used on top of a building at all.
============================================= ======== ======= ==============================================================================
Parameter Type Default Description / Example
============================================= ======== ======= ==============================================================================
BUILDING_COMPLEX_ROOFS Bool True Set this to false if only flat roofs should be used. Good for performance, but
not so nice for the eye.
If this is set to False, all other parameters do not matter.
BUILDING_COMPLEX_ROOFS_MIN_LEVELS Integer 1 Don't put complex roof on buildings smaller than the specified value unless
there is an explicit ``roof:shape`` flag in OSM.
BUILDING_COMPLEX_ROOFS_MAX_LEVELS Integer 5 Don't put complex roofs on buildings taller than the specified value unless
there is an explicit ``roof:shape`` flag in OSM.
BUILDING_COMPLEX_ROOFS_MAX_AREA Integer 800 Don't put complex roofs on buildings larger than this.
BUILDING_COMPLEX_ROOFS_MIN_RATIO_AREA Integer 250 If a building is larger than this but smaller than ``..._MAX_AREA``, then
it is compared whether the building tends to be small and long, because often
one more square buildings, which at the same time are large, the roof tends
to be flat.
BUILDING_SKEL_MAX_NODES Integer 10 The maximum number of nodes for which a complex roof is generated.
============================================= ======== ======= ==============================================================================
If the ``roof:shape`` tag is missing in OSM (which it most oftenly is), then the following parameters can help to make region specific decision on what roof types are to be applied randomly with a given ratio. Again — only if the roofs even may be somethine else than flat given the parameters above. Thes sum of the ratios should give 1.0.
============================================= ======== =======
Parameter Type Default
============================================= ======== =======
BUILDING_ROOF_FLAT_RATIO Decimal 0.2
BUILDING_ROOF_SKILLION_RATIO Decimal 0.1
BUILDING_ROOF_GABLED_RATIO Decimal 0.55
BUILDING_ROOF_HIPPED_RATIO Decimal 0.1
BUILDING_ROOF_PYRAMIDAL_RATIO Decimal 0.05
============================================= ======== =======
Finally the following parameters let you play around with how complex roofs are done.
============================================= ======== ======= ==============================================================================
Parameter Type Default Description / Example
============================================= ======== ======= ==============================================================================
BUILDING_SKEL_ROOFS_MIN_ANGLE Integer 10 The minimum angle of the roof
BUILDING_SKEL_ROOFS_MAX_ANGLE Integer 50 The max angle of the roof. Some randomness is applied between MIN and MAX.
BUILDING_SKILLION_ROOF_MAX_HEIGHT Decimal 2. No matter the MIN and MAX angles: a skillion will have at most this height
difference.
BUILDING_SKEL_ROOF_MAX_HEIGHT = 6. Decimal 6. Skip skeleton roofs (gabled, pyramidal, ..) if the roof height is larger than
this value.
BUILDING_SKEL_ROOF_DEFAULT_HEIGHT Decimal 2.5 If the roof_height is not given in OSM this is what is used to calculate the
real building height temporarily - until the real roof is constructed.
Unless you know the code behind or see very odd effects, then you should
probably not change this value.
============================================= ======== ======= ==============================================================================
.. _`OSM Simple 3D buildings`: http://wiki.openstreetmap.org/wiki/Simple_3D_buildings
.. _chapter-parameters-overlap-label:
---------------------------
......
......@@ -113,12 +113,11 @@ BUILDING_REDUCE_CHECK_TOUCH = False # -- before removing a building due to area,
BUILDING_SIMPLIFY_TOLERANCE = 1.0 # -- all points in the simplified building will be within the tolerance distance of the original geometry.
BUILDING_NEVER_SKIP_LEVELS = 6 # -- buildings that tall will never be skipped
BUILDING_COMPLEX_ROOFS = True # -- generate complex roofs on buildings? I.e. other shpaes than horizontal and flat
BUILDING_COMPLEX_ROOFS = True # -- generate complex roofs on buildings? I.e. other shapes than horizontal and flat
BUILDING_COMPLEX_ROOFS_MIN_LEVELS = 1 # don't put complex roof on buildings smaller than the specified value unless there is an explicit roof:shape flag
BUILDING_COMPLEX_ROOFS_MAX_LEVELS = 5 # don't put complex roofs on buildings taller the specified value unless there is an explicit roof:shape flag
BUILDING_COMPLEX_ROOFS_MAX_LEVELS = 5 # don't put complex roofs on buildings taller than the specified value unless there is an explicit roof:shape flag
BUILDING_COMPLEX_ROOFS_MAX_AREA = 800 # -- don't put complex roofs on buildings larger than this
BUILDING_COMPLEX_ROOFS_MIN_RATIO_AREA = 250 # if larger than this then ratio of length vs. area must be fulfilled
BUILDING_SKEL_ROOFS = True # -- generate complex roofs with pySkeleton?
BUILDING_SKEL_ROOFS_MIN_ANGLE = 10 # -- pySkeleton based complex roofs will
BUILDING_SKEL_ROOFS_MAX_ANGLE = 50 # have a random angle between MIN and MAX
BUILDING_SKEL_MAX_NODES = 10 # -- max number of nodes for which we generate pySkeleton roofs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment