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
0ccaa658
Commit
0ccaa658
authored
Dec 03, 2024
by
Eric Duminil
Browse files
sort by length
parent
f7f275de
Changes
2
Hide whitespace changes
Inline
Side-by-side
python_scripts/add_trees_to_open_street_map/add_trees.py
View file @
0ccaa658
...
...
@@ -38,7 +38,7 @@ from export_OSM_roads_to_csv import write_roads_to_csv
# 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))"
#
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))"
WKT
=
"POLYGON ((9.940352 49.804078, 9.942176 49.804646, 9.949343 49.804508, 9.953356 49.804383, 9.954686 49.804355, 9.955094 49.801932, 9.951661 49.800422, 9.949 49.800796, 9.94591 49.800713, 9.941339 49.801724, 9.94061 49.802527, 9.940352 49.804078))"
# 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))"
...
...
@@ -48,7 +48,6 @@ WKT = "POLYGON ((9.940352 49.804078, 9.942176 49.804646, 9.949343 49.804508, 9.9
########################
# TODO: Add DreSo Table info.
# TODO: Select random streets
EXISTING_TREES
=
'existing_trees/baumkataster/Baum.shp'
# Replace with None if no existing tree should be imported.
...
...
@@ -91,8 +90,8 @@ ROAD_PERCENTAGE = 50
DEFAULT_WIDTHS
=
{
'unclassified'
:
0
,
# 'residential': 8,
#
'motorway': -1,
#
'trunk': -1,
'motorway'
:
-
1
,
'trunk'
:
-
1
,
}
# For display purposes only:
...
...
python_scripts/add_trees_to_open_street_map/export_OSM_roads_to_csv.py
View file @
0ccaa658
...
...
@@ -36,6 +36,7 @@ def create_table(ways):
'maxspeed'
:
'maxspeed [km/h]'
})
for
col
in
NUMERICAL_COLUMNS
:
df
[
col
]
=
pd
.
to_numeric
(
df
[
col
])
df
=
df
.
sort_values
(
'length [m]'
,
ascending
=
False
)
return
df
...
...
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