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

Paweł Paprota ppawel at fastmail.fm
Sun Feb 10 18:50:26 GMT 2013


On 02/10/2013 12:13 PM, Stefan Keller wrote:
> To Pavel:
> Nice work. But I'm still not sure if OWL API is a solution to the question here:
> The doc says "Returns a list of changesets that affect given tile."
> But what we are after here is a set of regular GeoJSON objects (point,
> linestring, polygon).

Well the changesets oriented OWL API returns GeoJSON for changeset 
objects for a given tile - this is useful for visualizing changes/history.

There is a plan (and early stage implementation) to provide additional 
API that will return GeoJSON for all current/visible objects for a given 
tile - this will be useful for rendering the map using Kothic JS for 
example.

Another idea which you also mentioned is to provide yet another API (or 
maybe just as a parameter) that would return given tile as it was for 
given date but that is not planned for the near future, maybe some day. 
It's going to be quite expensive (in terms of storage and/or CPU).

 > What I also ever wondered is, how this Kothic alike API handles
 > linestrings and polygons which cross tile borders.

In OWL geometry is clipped to tile boundary using the standard 
ST_Intersection operation. I have a prototype rendering using Kothic 
working on my laptop and it's working OK.

Paweł




More information about the dev mailing list