diff --git a/mosstool/map/_map_util/aoi_matcher.py b/mosstool/map/_map_util/aoi_matcher.py index 51087e0..3c9d461 100644 --- a/mosstool/map/_map_util/aoi_matcher.py +++ b/mosstool/map/_map_util/aoi_matcher.py @@ -1607,11 +1607,10 @@ def _add_pois(aois, pois, projstr): poi = pois[poi_id] x, y = poi["coords"][0] external = poi["external"] - poi_name = external.get("name", "") out_pois[poi_uid] = { "id": poi_uid, - "name": poi_name, - "category": poi.get("catg", ""), + "name": poi.get("name", ""), + "category": poi.get("category", ""), "position": {"x": x, "y": y}, "aoi_id": poi_id_to_aoi_id[poi_id], "external": { diff --git a/mosstool/map/_map_util/convert_aoi.py b/mosstool/map/_map_util/convert_aoi.py index 4a7dbbe..3e05d17 100644 --- a/mosstool/map/_map_util/convert_aoi.py +++ b/mosstool/map/_map_util/convert_aoi.py @@ -103,6 +103,8 @@ def convert_poi(geos: FeatureCollection, projstr: str) -> list: { "id": poi_id, "coords": [projector(*coords)], + "name": name, + "category": catg, "external": { "name": name, "catg": catg, @@ -163,6 +165,8 @@ def in_boundary(geo): { "id": poly_id, "coords": [projector(lon, lat) for (lon, lat) in geo], + "name": "", + "category": poly_type, "external": { "name": "", # SUMO's POI does not have a name field "catg": poly_type, @@ -222,6 +226,8 @@ def in_boundary(geo): { "id": poi_id, "coords": [projector(lon, lat) for (lon, lat) in [gps_loc]], + "name": "", + "category": poi_type, "external": { "name": "", # SUMO's POI does not have a name field "catg": poi_type, diff --git a/pyproject.toml b/pyproject.toml index 5c69d96..9e91af7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mosstool" -version = "0.2.29" +version = "0.2.30" description = "MObility Simulation System toolbox " authors = ["Jun Zhang "] license = "MIT"