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

Nick Whitelegg Nick.Whitelegg at solent.ac.uk
Thu Feb 7 17:27:21 GMT 2013


Hello Ander,

I have an API for generating OSM data as geojson from a PostGIS database. The live api is part of the UK-orientated Freemap site and currently works with selected areas of the UK only, see

http://www.free-map.org.uk/0.6/about.html

However the code is open source and should in theory work with any OSM-derived PostGIS database.

Look at

https://github.com/nickw1/Freemap

(look inside 0.6/ws. There are two services, tsvr.php which takes an xyz tile definition and bsvr.php which takes a bbox and projection/SRID).

Nick

-----Ander Pijoan <ander.pijoan at deusto.es> wrote: -----
To: dev at openstreetmap.org
From: Ander Pijoan <ander.pijoan at deusto.es>
Date: 07/02/2013 04:59PM
Subject: [OSM-dev] Is there any API to get data from OSM as geoJson?

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.

-- 
Ander Pijoan Lamas
Research Assistant, Deustotech
Computer Science Engineer
University of Deusto

E-mail: ander.pijoan at deusto.es
Phone: +34 664471228
in: http://www.linkedin.com/profile/view?id=162888312
_______________________________________________
dev mailing list
dev at openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20130207/3e0e31e9/attachment.html>


More information about the dev mailing list