hi
I'm trying to use pyrosm to read a pbf file and filter it to get 'major' driving edges i.e. which are not parking/parking aisle etc.
I tried using the "exclude" filter type to get edges that don't have specific tags, but I still get such edges.
Any idea what am I doing wrong?
thanks
My code is:
from pyrosm import OSM, get_data
drive_filter = dict(
area=['yes'],
service=['parking', 'parking_aisle', 'private', 'emergency_access','parking_aisle'],
highway=['cycleway', 'footway', 'path', 'pedestrian', 'steps', 'track',
'corridor', 'elevator', 'escalator', 'proposed', 'construction',
'bridleway', 'abandoned', 'platform', 'raceway'],
motor_vehicle=['no'],
motorcar=['no']
)
osm = OSM(get_data("test_pbf"))
driving = osm.get_data_by_custom_criteria(custom_filter=drive_filter,
osm_keys_to_keep="highway",
filter_type="exclude")
print(driving['service'].unique())
Output is:
[None 'driveway' 'parking_aisle']
asked
14 Mar '21, 15:45
anatrk
11●1●1●3
accept rate:
0%