Is there an API for openstreetmap?

Yngve Sneen Lindal picture Yngve Sneen Lindal · Jul 8, 2009 · Viewed 62.6k times · Source

I wonder if there is any API I could query OSM data through, for example; Are (lon_1, lat_1) at land or at sea? Or could it be possible to get an island as a well-defined polygon? The only usage I've seen so far has just been tools for rendering OSM data (generating tiles).

Answer

vikingosegundo picture vikingosegundo · Jul 9, 2009

Yes, there is an api and xapi (extended api).

I havent used these yet.

But there is also the cloudmade api to OSM. I played a bit with the python api.

I am not sure, if any of them could help you with your particular problem, but you could search for a coastline near to your point. If your point is within the polygon tagged natural=coastline, you have an island (or a continent)...