[OSM-talk] Another point in support of ways as ordered lists

Etienne 80n80n at gmail.com
Tue Sep 26 21:29:59 BST 2006


Rob
An xpath expression like $elements[tag[@k="name"]] will select all nodes and
ways with a name tag.  You don't need to do anything special to combine
nodes and ways, because the $elements variable is already a set of nodes and
ways that match the rule (assuming the rule is <rule e="node|way">).

If you want all the names in alphabetical order try something like:
<xsl:for-each select='$elements[[tag[@k="name"]]/@name''>
  <xsl:sort order="ascending">
  ...

Etienne



On 9/26/06, Robert Hart <Robert.Hart at burohappold.com> wrote:
>
> I just had a brain wave. If ways are ordered lists of nodes, then POIs can
> be ways containing only one node. This may sound odd, but I think it has
> real advantages (well at least one advantage anyway...)
>
> I've been playing around with creating map indices in osmarender. To do
> this
> I need to know the name and approximate location of everything that should
> be included in the index. This means I have to handle nodes and ways/areas
> seperately, which is going to be painful if I want the whole index in
> alphabetical order (as opposed to having separate indices for ways and
> nodes). If POIs were single-node ways, everything would just work with one
> code path.

Rob
>
>
>
> This message has been scanned for viruses by MailControl -
> www.mailcontrol.com
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20060926/819f7492/attachment.html>


More information about the talk mailing list