[GIS] Overpass-API – Get landuse from latitude/longitude

overpass-api

Based on my question at StackOverflow https://stackoverflow.com/questions/44021365/openstreetmap-nominatim-and-landuse

Can you tell me if it is possible to get the landuse of a point with latitude/longitude? After my question at StackOverflow, my solution is so far:

http://overpass-api.de/api/interpreter?data=way(around:25,48.7749365,9.1827252)[landuse];(._;>;);out;

If it is not possible to get the landuse from a point, what is the minimum parameter (now 25 meters) that will work? With 20 meters there is a result, too. But is this suitable for most points on islands?

By the way, the query url is generated at runtime.

Best Answer

Technically speaking it is possible via the is_in; statement, although it would require that you set up your own Overpass API instance, and modify the area creation script, so that is also creates areas for landuses without a name.

The area creation script deployed on overpass-api.de requires multipolygon relations and landuse ways to also carry a name tag. In many cases OSM data won't have a name tag.

The solution you've shown above obviously won't work, if you're more than 25 meters away from the way boundary. There's also no generally suitable value which would work under every condition, so around is clearly only of limited use for your use case.