[OSM-dev] Getting information from relations.
marqqs at gmx.eu
marqqs at gmx.eu
Sun Jan 22 22:23:10 GMT 2012
Hi Morten,
first, I would take osm2pgsql for this purpose (openptmap.org does).
Nevertheless, there are two cheep alternatives which may be sufficient for your application:
1. Osmosis option --a2p
https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.39#--areapoints_.28--a2p.29
Works for ways only - as far as I know. But it certainly can be extended to take care about relations as well.
2. osmconvert --all-to-nodes
https://wiki.openstreetmap.org/wiki/Osmconvert#Dispose_of_Ways_and_Relations_and_Convert_them_to_Nodes
This is used by OpenLinkMap. Every way and every relation is converted to a node.
Markus
-------- Original-Nachricht --------
> Datum: Sun, 22 Jan 2012 18:16:12 +0100
> Von: Morten Olsen Lysgaard <morten at lysgaard.no>
> An: dev at openstreetmap.org
> Betreff: [OSM-dev] Getting information from relations.
> Hi.
> I'm currently running a project on open aviation data.
> In it I'm planning to use relations for some of the information.
> There's just this catch: When i show the map i let users click features
> to show a popup-box with all the tags that this object has.
> Up till now I've achieved this by serving my map as a WFS layer.
> The WFS layer reads a database from a osm2pgsql sync. In this sync, no
> information about relations seems to be kept. That means that when I now
> want to move some of my data over to relations, there's no way to let
> users see the tags that are in the relation.
>
> Is there any other way to achieve this, in short, this is what I want.
>
> When a user clicks on something on my map, information must be shown of
> what tags that object and any relation it's a part of has.
>
> I'm willing to do anything. I know there exists something named WMS
> GetFeatureInfo, but I'm not sure how it ties together with openstreetmap.
>
> Thanks in advance, Morten.
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
More information about the dev
mailing list