Skip to content

Commit

Permalink
Add compatibility for reading name directly in AOI properties
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchenplus committed Oct 8, 2024
1 parent fd1cae1 commit c6ef3d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions mosstool/map/_map_util/aois/convert_aoi_poi.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ def convert_aoi(
0
] # Inner shape is not supported yet
aoi_type = feature["properties"].get("type", "")
# build tag from property
for _prop_key in ["name", "landuse", "leisure", "amenity", "building"]:
_prop_value = feature["properties"].get(_prop_key, "")
if _prop_value:
osm_tags.append(
{
_prop_key: _prop_value,
}
)
aois.append(
{
"id": aoi_id,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mosstool"
version = "1.0.6"
version = "1.0.7"
description = "MObility Simulation System toolbox "
authors = ["Jun Zhang <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit c6ef3d8

Please sign in to comment.