I want to extract/filter in all Way elements within a specific region tagged as 'highway' from an OSM file. I am currently thinking of using a Python library called osmread (by A Dezhin) that I stumbled upon online. It's pretty straightforward. Here's an example usage that I got from his repository.
from osmread import parse_file, Way highway_count = 0 for entity in parse_file('foo.osm.bz2'): if isinstance(entity, Way) and 'highway' in entity.tags: highway_count += 1 print "%d highways found" % highway_count
This is good enough, but I was wondering if qGIS also has a similar function that allows users to filter elements (Node, Way, Relation) given a specific set of criteria. I would prefer to use qGIS for the 'instant' visualization.
In the end, I hope to build a road network and conduct some analysis.
Thanks, all, in advance.