Commit 5b3c5107 authored by Eric Duminil's avatar Eric Duminil
Browse files

add_trees: refactor

parent 958fde5a
......@@ -55,6 +55,11 @@ TREE_DISTANCE = 25 # [m]
# Unless there's already another tree closer than MIN_DISTANCE away:
MIN_DISTANCE = 10 # [m]
TREE_SPECIES = 'Acer platanoides' # Should be known by Tree-DB
TREE_CROWN_DIAMETER = 8 # [m]
TREE_HEIGHT = 12 # [m]
TREE_TRUNK_DIAMETER = 90 # [cm]
########################
# STREETS #
########################
......@@ -211,10 +216,10 @@ def place_trees(forest: Forest, ways: list, region: str, to_local, tree_distance
forest.add_tree_if_possible(min_distance_2, x, y,
color='#DFFF00',
type='Fake Tree',
description='Tilia tomentosa',
diameter=6, # [m]
height=10, # [m]
trunk_diameter=50, # [cm]
description=TREE_SPECIES,
diameter=TREE_CROWN_DIAMETER, # [m]
height=TREE_HEIGHT, # [m]
trunk_diameter=TREE_TRUNK_DIAMETER, # [cm]
source='add_trees.py'
)
......
Supports Markdown
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