I am looking for a robust way to determine if a geo point (long, lat) is located on a road
I am currently using openstreetmap overpass-api with the following query:
way[highway](around:3.0, {lat}, {lng});out;
And then I am looking for relevant values of "way" with "highway" from the following:
'motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'service', 'tertiary_link', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link'
Yet I see that a 'road' is somehow not counted for its full width, but only its "middle spine", Here is an example of a grid with my classifier (Red means on a road, Green means not on a road):
I can estimate the road's width by its "lane" count, yet this is only an estimation, and not all roads has the "lane" tag.
What would be the best way to approach this problem?
My data is only relevant to the US
I can suffer some level of mistakes / errors
A batch / bulk solution is preferred
EDIT:
The picture demonstrates the problem, I can only be close to the road's spine, and I cannot tell if I am on a road if I am far from the spine,
It would be great if I could get the full-road-polygon and query over it