@@ -35,7 +35,9 @@ def _get_network_filter(network_type: str) -> str:
3535 excludes ways that are incompatible with the requested network type. You
3636 can choose from the following types:
3737
38- "all" retrieves all public and private-access ways currently in use.
38+ "all" retrieves all public and private-access ways currently in use,
39+ (defined to exclude ways that represent areas either explicitly (area=yes)
40+ or by OSM tagging convention (rest_area, services))
3941
4042 "all_public" retrieves all public ways currently in use.
4143
@@ -75,8 +77,8 @@ def _get_network_filter(network_type: str) -> str:
7577 filters ["drive" ] = (
7678 f'["highway"]["area"!~"yes"]{ settings .default_access } '
7779 f'["highway"!~"abandoned|bridleway|bus_guideway|construction|corridor|cycleway|elevator|'
78- f"escalator|footway|no|path|pedestrian|planned|platform|proposed|raceway|razed|service| "
79- f'steps|track"]'
80+ f"escalator|footway|no|path|pedestrian|planned|platform|proposed|raceway|razed|"
81+ f'rest_area|service|services| steps|track"]'
8082 f'["motor_vehicle"!~"no"]["motorcar"!~"no"]'
8183 f'["service"!~"alley|driveway|emergency_access|parking|parking_aisle|private"]'
8284 )
@@ -85,8 +87,8 @@ def _get_network_filter(network_type: str) -> str:
8587 filters ["drive_service" ] = (
8688 f'["highway"]["area"!~"yes"]{ settings .default_access } '
8789 f'["highway"!~"abandoned|bridleway|bus_guideway|construction|corridor|cycleway|elevator|'
88- f"escalator|footway|no|path|pedestrian|planned|platform|proposed|raceway|razed|steps| "
89- f'track"]'
90+ f"escalator|footway|no|path|pedestrian|planned|platform|proposed|raceway|razed|"
91+ f'rest_area|services|steps| track"]'
9092 f'["motor_vehicle"!~"no"]["motorcar"!~"no"]'
9193 f'["service"!~"emergency_access|parking|parking_aisle|private"]'
9294 )
@@ -99,7 +101,7 @@ def _get_network_filter(network_type: str) -> str:
99101 filters ["walk" ] = (
100102 f'["highway"]["area"!~"yes"]{ settings .default_access } '
101103 f'["highway"!~"abandoned|bus_guideway|construction|cycleway|motor|no|planned|platform|'
102- f'proposed|raceway|razed"]'
104+ f'proposed|raceway|razed|rest_area|services "]'
103105 f'["foot"!~"no"]["service"!~"private"]'
104106 f'["sidewalk"!~"separate"]["sidewalk:both"!~"separate"]'
105107 f'["sidewalk:left"!~"separate"]["sidewalk:right"!~"separate"]'
@@ -110,23 +112,24 @@ def _get_network_filter(network_type: str) -> str:
110112 filters ["bike" ] = (
111113 f'["highway"]["area"!~"yes"]{ settings .default_access } '
112114 f'["highway"!~"abandoned|bus_guideway|construction|corridor|elevator|escalator|footway|'
113- f'motor|no|planned|platform|proposed|raceway|razed|steps"]'
115+ f'motor|no|planned|platform|proposed|raceway|razed|rest_area|services| steps"]'
114116 f'["bicycle"!~"no"]["service"!~"private"]'
115117 )
116118
117119 # to download all public ways, just filter out everything not currently in
118120 # use or that is private-access only
119121 filters ["all_public" ] = (
120122 f'["highway"]["area"!~"yes"]{ settings .default_access } '
121- f'["highway"!~"abandoned|construction|no|planned|platform|proposed|raceway|razed"]'
123+ f'["highway"!~"abandoned|construction|no|planned|platform|proposed|raceway|razed|'
124+ f'rest_area|services"]'
122125 f'["service"!~"private"]'
123126 )
124127
125128 # to download all ways, including private-access ones, just filter out
126129 # everything not currently in use
127130 filters ["all" ] = (
128131 '["highway"]["area"!~"yes"]["highway"!~"abandoned|construction|no|planned|platform|'
129- 'proposed|raceway|razed"]'
132+ 'proposed|raceway|razed|rest_area|services "]'
130133 )
131134
132135 if network_type in filters :
0 commit comments