mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-03 03:11:52 +02:00
Issue #83: add placement tag test.
This commit is contained in:
parent
a60b3493b5
commit
059ffa2805
1 changed files with 16 additions and 8 deletions
|
@ -96,10 +96,19 @@ ROAD_LANES_AND_FEATURES: list[dict[str, str]] = [
|
|||
]
|
||||
|
||||
|
||||
# See https://wiki.openstreetmap.org/wiki/Proposed_features/placement
|
||||
|
||||
PLACEMENT_FEATURES_1: list[dict[str, str]] = [
|
||||
{"lanes": "1"},
|
||||
{"lanes": "2", "placement": "middle_of:1"},
|
||||
{"lanes": "4", "placement": "middle_of:2"},
|
||||
{"placement": "transition"},
|
||||
{"lanes": "3", "placement": "right_of:1"}, # or placement=left_of:2
|
||||
]
|
||||
|
||||
|
||||
class Grid:
|
||||
"""
|
||||
Creating map with elements ordered in grid.
|
||||
"""
|
||||
"""Creating map with elements ordered in grid."""
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.x_step: float = 0.0003
|
||||
|
@ -165,11 +174,7 @@ def draw(
|
|||
"""Draw map."""
|
||||
configuration: MapConfiguration = MapConfiguration(level="all")
|
||||
|
||||
flinger: Flinger = Flinger(
|
||||
boundary_box,
|
||||
18,
|
||||
osm_data.equator_length,
|
||||
)
|
||||
flinger: Flinger = Flinger(boundary_box, 18, osm_data.equator_length)
|
||||
svg: Drawing = Drawing(output_path.name, flinger.size)
|
||||
constructor: Constructor = Constructor(
|
||||
osm_data, flinger, SCHEME, SHAPE_EXTRACTOR, configuration
|
||||
|
@ -194,3 +199,6 @@ if __name__ == "__main__":
|
|||
ROAD_WIDTHS_AND_FEATURES,
|
||||
Path("out") / "width.svg",
|
||||
)
|
||||
road_features(
|
||||
ROAD_TYPES, PLACEMENT_FEATURES_1, Path("out") / "placement.svg"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue