diff --git a/map_machine/doc/draw_elements.py b/map_machine/doc/draw_elements.py index 8ca93b6..a4dfab2 100644 --- a/map_machine/doc/draw_elements.py +++ b/map_machine/doc/draw_elements.py @@ -14,6 +14,7 @@ from map_machine.geometry.flinger import Flinger from map_machine.map_configuration import MapConfiguration from map_machine.mapper import Map from map_machine.osm.osm_reader import OSMData, OSMNode, OSMWay +from map_machine.osm.tags import HIGHWAY_VALUES, AEROWAY_VALUES, RAILWAY_TAGS from map_machine.pictogram.icon import ShapeExtractor from map_machine.scheme import Scheme from map_machine.workspace import Workspace @@ -26,45 +27,6 @@ SHAPE_EXTRACTOR: ShapeExtractor = ShapeExtractor( ) DEFAULT_ZOOM: float = 18.0 - -HIGHWAY_VALUES: list[str] = [ - "motorway", - "trunk", - "primary", - "secondary", - "tertiary", - "unclassified", - "residential", - "service", - "service_minor", - "road", - "pedestrian", - "living_street", - "bridleway", - "cycleway", - "footway", - "steps", - "path", - "track", - "raceway", -] - -AEROWAY_VALUES: list[str] = [ - "runway", - "taxiway", -] - -RAILWAY_TAGS: list[dict[str, str]] = [ - {"railway": "rail"}, - {"railway": "light_rail"}, - {"railway": "monorail"}, - {"railway": "funicular"}, - {"railway": "narrow_gauge"}, - {"railway": "subway"}, - {"railway": "subway", "color": "red"}, - {"railway": "subway", "color": "blue"}, -] - ROAD_WIDTHS_AND_FEATURES: list[dict[str, str]] = [ {"width": "4"}, {"width": "8"}, diff --git a/map_machine/osm/tags.py b/map_machine/osm/tags.py new file mode 100644 index 0000000..95b2b4e --- /dev/null +++ b/map_machine/osm/tags.py @@ -0,0 +1,35 @@ +HIGHWAY_VALUES: list[str] = [ + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "unclassified", + "residential", + "service", + "service_minor", + "road", + "pedestrian", + "living_street", + "bridleway", + "cycleway", + "footway", + "steps", + "path", + "track", + "raceway", +] +AEROWAY_VALUES: list[str] = [ + "runway", + "taxiway", +] +RAILWAY_TAGS: list[dict[str, str]] = [ + {"railway": "rail"}, + {"railway": "light_rail"}, + {"railway": "monorail"}, + {"railway": "funicular"}, + {"railway": "narrow_gauge"}, + {"railway": "subway"}, + {"railway": "subway", "color": "red"}, + {"railway": "subway", "color": "blue"}, +]