I'm using Graphhopper as a routing service for my Android project and I want to know how can I extract street data (as a polygon) from *.osm.pbf format?
Later I want to use that data so that I could detect if user is within boundaries of that street.
Edit:
I've used Osmosis as it was referenced in this answer (selecting highways) but when I try to investigate xml after extraction I still don't understand how can I get a particular street since there still are some other objects left (like houses, bus stops).
Street data is stored in GraphHopper. You could traverse the full graph e.g. via extending XFirstSearch and then do on checkAdjacent:
If you want to get an edge from a location for the "fence-use-case" you can have a look into LocationIndexTree.
Some clarifications:
The routing graph itself does not need this data but still we need this data to display the route etc.
As explained on the mailing list.