Search code examples
osmdroid

Nearest geopoint that is on road


I get a geopoint from my database as a response to query. I need to know the best way to find the nearest point on a road for the recieved geopoint.

Tried to create a table with all geopoints on road, manually, but it is taking too much effort.

Is it possible to get all the points on roads in a city using some queries?

Are there services to get the nearest point on road/nearest road, points on a road?


Solution

  • "Are there services to get the nearest point on road/nearest road, points on a road?"

    Yes: routing services. They are particularly good to provide, from any point on the map, the closest point on the closest road.

    You can experiment with the OSRM web interface for instance.

    When using osmdroid, you can very easily access to routing services by using OSMBonusPack.