Skip to content

Commit

Permalink
consolidate tags to include major roads
Browse files Browse the repository at this point in the history
  • Loading branch information
songololo committed Nov 26, 2024
1 parent 53bba84 commit 03632b1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Binary file modified docs/public/images/graph_clean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cityseer"
version = '4.16.9'
version = '4.16.10'
description = "Computational tools for network-based pedestrian-scale urban analysis"
readme = "README.md"
requires-python = ">=3.10, <3.14"
Expand Down
23 changes: 20 additions & 3 deletions pysrc/cityseer/tools/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _auto_clean_network(
)
G = graphs.nx_remove_filler_nodes(G)
# do smaller scale cleaning
tags = [
split_tags = [
# "trunk",
# "primary",
# "secondary",
Expand All @@ -367,6 +367,23 @@ def _auto_clean_network(
"living_street",
"unclassified",
]
consolidate_tags = [
"trunk",
"primary",
"secondary",
"tertiary",
"residential",
"service",
"cycleway",
"bridleway",
"pedestrian",
"steps",
"footway",
"footway_pedestrian", # plazas
"path",
"living_street",
"unclassified",
]
dists = [6, 12]
simplify_angles = 95
#
Expand All @@ -376,7 +393,7 @@ def _auto_clean_network(
buffer_dist=dist,
squash_nodes=True,
centroid_by_itx=True,
osm_hwy_target_tags=tags,
osm_hwy_target_tags=split_tags,
prioritise_by_hwy_tag=True,
simplify_line_angles=simplify_angles,
contains_buffer_dist=50,
Expand All @@ -386,7 +403,7 @@ def _auto_clean_network(
buffer_dist=dist,
crawl=True,
centroid_by_itx=True,
osm_hwy_target_tags=tags,
osm_hwy_target_tags=consolidate_tags,
prioritise_by_hwy_tag=True,
simplify_line_angles=simplify_angles,
contains_buffer_dist=50,
Expand Down

0 comments on commit 03632b1

Please sign in to comment.