Skip to content

Commit

Permalink
add depth offset for subway lanes
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchenplus committed Oct 29, 2024
1 parent 9916996 commit c4f6cbb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mosstool/map/_map_util/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
POI_START_ID = 7_0000_0000
PUBLIC_LINE_START_ID = 9_0000_0000

SUBWAY_HEIGHT_OFFSET = -20 # underground depth of subway

CLUSTER_PENALTY = 0.01 # Clustering penalty term
UP_THRESHOLD = 0.01 # Select the one with the largest number of clusters within the threshold range
HAS_WALK_LANES_HIGHWAY = [
Expand Down
2 changes: 2 additions & 0 deletions mosstool/map/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3860,6 +3860,8 @@ def create_subway_connections(geos: list, stas: list) -> List[List[int]]:
if coords.shape[1] > 2
else np.zeros((coords.shape[0], 1), dtype=np.float64)
)
if any(z == 0 for z in coords_z):
coords_z += SUBWAY_HEIGHT_OFFSET
coords_xy = np.stack(projector(*coords.T[:2]), axis=1) # (N, 2)
coords_xyz = np.column_stack([coords_xy, coords_z]) # (N, 3)
lane_width = self.default_lane_width
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.14"
version = "1.0.15"
description = "MObility Simulation System toolbox "
authors = ["Jun Zhang <[email protected]>","Junbo Yan <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit c4f6cbb

Please sign in to comment.