[OSM-dev] Is there any API to get data from OSM as geoJson?

Martin Raifer tyr.asd at gmail.com
Thu Feb 7 17:51:10 GMT 2013


Hi

Not really an answer to your question, but anyway:
For overpass turbo [1] I have implemented a converter on client side (as a  
Leaflet-Plugin [2]). It supports multipolygons and has some  
polygon-detection-magic. As far as I can tell, this client side conversion  
is not really a substantial "big pain" for browsers (when compared to  
rendering the same data).

Bye
Martin

[1] http://overpass-turbo.eu
[2] https://github.com/tyrasd/overpass-ide/blob/master/libs/OSM4Leaflet.js



Am 07.02.2013, 17:58 Uhr, schrieb Ander Pijoan <ander.pijoan at deusto.es>:

> Hi everyone
>
> I am currently working with different technologies for showing OSM data  
> in slippy maps and I noticed that some of those maps would work better 
> with GeoJSON data format.
>
> I use Overpass API for downloading data but it doesn't export in GeoJSON
> format. The nearest approach would be to ask for it as OSM-JSON, store  
> all the nodes ids and locations, store all the ways ids and node refs
> and then build the relations geometries but it's quite a big pain for
> browsers.
>
> I've been looking for some info in OSM wiki but I haven't been able to  
> find nothing. Does anyone know if there exists something?
>
> Thank you very much.



More information about the dev mailing list