Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CircularGreenSimCity
CircularGreenSimCity
Commits
958fde5a
Commit
958fde5a
authored
Nov 08, 2024
by
Eric Duminil
Browse files
More documentation for add_trees
parent
aaca2ec3
Changes
1
Hide whitespace changes
Inline
Side-by-side
python_scripts/add_trees_to_open_street_map/add_trees.py
View file @
958fde5a
...
...
@@ -26,25 +26,39 @@ import geopandas as gpd
from
tree
import
Forest
from
import_existing_trees
import
get_existing_forest
# TODO: Use Args
# TODO: Document
# TODO: Write issue
# TODO: Write tests?
# From RegionChooser, or https://transfer.hft-stuttgart.de/gitlab/circulargreensimcity/circulargreensimcity/-/wikis/Fallstudien/Gromb%C3%BChl
WKT
=
"POLYGON((9.947021 49.803063, 9.947011 49.800917, 9.955025 49.800810, 9.955110 49.803019, 9.947021 49.803063))"
# Grafenbühl
################################################################################
# USER PARAMETERS #
################################################################################
########################
# REGION #
########################
# From RegionChooser, or https://wktmap.com/
# Case-study for Grombühl Paper. (4 Blocks):
WKT
=
"POLYGON((9.942183 49.804010, 9.942301 49.802740, 9.945477 49.802698, 9.945563 49.804014, 9.942167 49.804055, 9.942183 49.804010))"
# Grafenbühl:
# WKT = "POLYGON((9.147551 48.908059, 9.148635 48.907953, 9.149525 48.907819, 9.151177 48.907819, 9.151413 48.907840, 9.153226 48.908087, 9.153387 48.906705, 9.149160 48.906634, 9.148999 48.906620, 9.147551 48.908059))"
# Replace with None if no existing tree should be imported
EXISTING_TREES
=
'existing_trees/Trees_ideal_2_20240227.shp'
# EXISTING_TREES = 'existing_trees/baumkataster/Baum.shp'
########################
# TREES #
########################
EXISTING_TREES
=
'existing_trees/baumkataster/Baum.shp'
# Replace with None if no existing tree should be imported.
# EXISTING_TREES = None
# NOTE: Should be the same for Shapefile and the CityGML the trees will be imported to.
EPSG_ID
=
25832
# Trees will be planted every TREE_DISTANCE along roads:
TREE_DISTANCE
=
10
# [m]
TREE_DISTANCE
=
25
# [m]
# Unless there's already another tree closer than MIN_DISTANCE away:
MIN_DISTANCE
=
TREE_DISTANCE
*
0.5
# [m]
# For display purposes only:
GRID
=
100
# [m]
MIN_DISTANCE
=
10
# [m]
########################
# STREETS #
########################
# If streets from OSM don't have known width, which one should be used? In [m]
# Leave empty to get default from similar streets, if available
# Set to -1 if you want to disable trees along the roads
...
...
@@ -55,6 +69,18 @@ DEFAULT_WIDTHS = {
# 'trunk': -1,
}
# For display purposes only:
GRID
=
100
# [m]
################################################################################
# SCRIPT. Probably no need to change anything below. #
################################################################################
# TODO: Use Args
# TODO: Document
# TODO: Write issue
# TODO: Write tests?
SCRIPT_DIR
=
Path
(
__file__
).
resolve
().
parent
OUTPUT_DIR
=
SCRIPT_DIR
/
'output'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment