I have a lat/lng pair, and I need to find the nearest street and intersection.
For example: street X, corner with Y.
I have Nominatim and Overpass running.
My approach is:
- Get all ways near the lat/lng with Overpass
- Calculate distance between all nodes and my lat/lng
- Find the two closest to my lat/lng and that belong to different streets
- Those should be X, and then Y
Is there any better approach? I feel like I'm wasting CPU and underutilizing Overpass.
Also, I know that X and Y may not intersect at all. This only means they are close, nothing else.
Any help is welcome.