[OSM-dev] Getting information from relations.
Frederik Ramm
frederik at remote.org
Tue Jan 24 10:39:26 GMT 2012
Hi,
On 01/23/12 22:33, Morten Olsen Lysgaard wrote:
> My project is going to need a tileserver in the future anyway, maybe
> it's time to start using that.
> Then new architecture would be:
Ambitious.
> * A tile-server that generates raster-maps based on the rails-port database
This is not how it is usually done; you will first have to make a
database with geometry objects from your rails port database. The usual
way is a "planet export" from the rails-port database and then an
osm2pgsql import into a separate database (or imposm instead of
osm2pgsql if you don't need updates).
> * Some sort of application that answers to wfsGetFeatureInfo requests
> and returns all the tags and relations tags about objects.
>
> This last point is the missing bit, how can I achieve this? Do I have to
> code something from scratch or has anything like this been done before.
The simplest way would probably be tweaking osm2pgsql/imposm so that the
information that you care about is copied into the geometry tables, most
likely making a separate geometry for each relation (e.g. this is how
route relations are turned into geometries for things like OpenCycleMap)
but possibly also merging the information from several relations into
one resulting geometry object. That way, you can then run a simple
Mapserver or Geoserver installation and GetFeatureInfo will magically work.
Bye
Frederik
More information about the dev
mailing list