Answer the question
In order to leave comments, you need to log in
How to determine on which object a point is located on the map?
Is there a service for OSM that allows you to determine if a point (LatLng coordinates) is on a road/building/lawn/etc?
If not, is it possible in principle to implement something like this? How do you imagine it in general terms?
I roughly imagine (although, perhaps, erroneously) that you can get a building polygon from OSM, and for example, check if a point enters this polygon. But then with the roads (and I'm interested in them), this will not work, because the road is essentially a broken line that does not have any area ...
Answer the question
In order to leave comments, you need to log in
For all this, for example, a PostgreSQL database with an extension for PostGIS spatial data is used. A spatial index is built for the objects of interest and the occurrence of the point is determined. With the road, a buffer is built around it, roughly speaking a meter in different directions, and a hit to it is already determined.
You can just poke around on OSM data in Overpass-Turbo - for example, determine what kind of settlement is in the center of the map overpass-turbo.eu/s/h2M
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question