[OSM-dev] API for local Postgis installs?

Andy Allan gravitystorm at gmail.com
Mon Oct 22 10:36:53 BST 2007

On 10/21/07, Nick Whitelegg <nick at hogweed.org> wrote:
> One of the things I'd like to do now with Freemap (OSM countryside map) is
> develop functionality to allow users to click on a rendered way and get
> information about it (e.g. the state of the path), or roll the mouse over a
> pub and see whether it's known for good beer etc :-)
> Part of this will involve developing a back end which queries the local
> Freemap OSM PostGIS install. Obviously this would be of general use to anyone
> installing the OSM postgis database locally on their system. Would there be
> interest from others in such an API? If so feel free to suggest a few API
> calls people would find useful. One (possibly ambitious) idea would be to
> allow users to make local changes to the local postgis database and (at the
> same time) to OSM, checking to see if OSM has already been modified more
> recently than the local database.

I'm not sure this is possible - osm2pgsql is a lossy conversion, so
it's unlikely you can backtrack. It might work for simple features but
others e.g polygons, relations it might not be possible.

As a thought exercise (since I've no idea what's planned) if the M1
was stored as a relation/entity with lots of member ways, osm2pgsql
might apply the tags from the entity to lots of linestrings in the db
to make the next (mapnik) render step easier/feasible. I'm not even
sure of osm2pgsql keeps the osm way ids etc or just discards them as
irrelevant to rendering.


More information about the dev mailing list