Skip to content

Commit

Permalink
tweaks default cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
songololo committed Nov 25, 2024
1 parent d4837fb commit ef0de3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
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.3'
version = '4.16.4'
description = "Computational tools for network-based pedestrian-scale urban analysis"
readme = "README.md"
requires-python = ">=3.10, <3.14"
Expand Down
16 changes: 12 additions & 4 deletions pysrc/cityseer/tools/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ def osm_graph_from_poly(
graph_crs,
buffer_dist=dist,
squash_nodes=True,
osm_hwy_target_tags=tags,
centroid_by_itx=True,
osm_hwy_target_tags=tags,
prioritise_by_hwy_tag=True,
simplify_line_angles=simplify_line_angles,
)
Expand All @@ -463,22 +463,27 @@ def osm_graph_from_poly(
graph_crs,
buffer_dist=dist,
crawl=True,
osm_hwy_target_tags=tags,
centroid_by_itx=True,
osm_hwy_target_tags=tags,
prioritise_by_hwy_tag=True,
simplify_line_angles=simplify_line_angles,
)
graph_crs = graphs.nx_remove_filler_nodes(graph_crs)
# do smaller scale cleaning
tags = [
"primary",
"secondary",
"tertiary",
"residential",
"service",
"cycleway",
"bridleway",
"footway",
"path",
"living_street",
"unclassified",
]
dists = [5, 10]
dists = [6, 12]
simplify_angles = 95
#
for dist in dists:
Expand All @@ -488,6 +493,7 @@ def osm_graph_from_poly(
squash_nodes=True,
centroid_by_itx=True,
osm_hwy_target_tags=tags,
prioritise_by_hwy_tag=True,
simplify_line_angles=simplify_angles,
)
graph_crs = graphs.nx_consolidate_nodes(
Expand All @@ -509,9 +515,11 @@ def osm_graph_from_poly(
"residential",
"service",
"cycleway",
"busway",
"bridleway",
"footway",
"path",
"living_street",
"unclassified",
],
)
# snap gapped endings / roaods - don't clean danglers before this
Expand Down

0 comments on commit ef0de3a

Please sign in to comment.