[OSM-talk] OSM Server Side Script

Roland Olbricht roland.olbricht at gmx.de
Thu May 28 16:47:59 BST 2009


the project I've been working on the last few month now into some kind of beta 
status. So I you would like a reverse gazetter or a download an area of the 
size of a city, have a look at

In particular, this might be relevant to the topic "Advanced multipolygons - 
do we need area types? How well are they supported?" of the London Hack 

The idea behind the story is to have a server where one can obtain derived 
data as a web service. Areas are a standard example of that kind of things: 
the borders are as ways of use on their own, but they also define the area.
In the OSM database, you find only the borders represented as ways and a 
relation declaring which borders constitute a certain area. So every 
application must figure out the areas on its own and has to rewrite the code 
and spent possibly substantial computation time (think of calculating a 
nation's borders on a mobile phone) on that. That's where the OSM Server Side 
Script server comes into the game: the derived data gets accessible to any 
application just with a single query, and the mappers still only need to edit 
and declare the independent data.

And even the rules can be edited by the user as explained in documentation:

So in the long term, we may also do things like preparing the data for 
routing, deriving "residental areas" as desired here
or apply the machine readable version of the wiki as proposed here
to detect conflicting objects in the database.

There's a lot of work to do left. So I would like to get some feedback what to 
do first. And maybe there's even somebody who would like to join the 
project :)

Some issues I see so far

* A spatially intrinsic query for ways: At the moment, you only can query for 
nodes and then get the back references to get the data for an area. However, 
this would not include ways that cross an area without having a node inside 
of it. So this enhancement of the area-query would make it possible to 
include also those ways.
* Mixed queries with spatial and tag-based criteria: an example would be to 
find all motorways in Germany.
* Restriction of the output: If the size of the data is relevant (think of a 
mobile phone as a client), the server could omit certain useless tags (like 
the frequent "created_by" tag to reduce file size or processing complexity.
* Or other things that come into your mind ...

* Proceed with the documentation: at the moment, the documentation is reduced 
to the essential things. And I don't even know whether the documentation is 
helpful or not.
* Make the source code of the server accessible: The code is a bunch of C++ 
source files along with some bash scripts. It is quite a mess at the moment. 
And I'm even not sure whether I should place it in the OSM SVN or not.

I would be grateful for every kind of feedback.


More information about the talk mailing list