[OSM-dev] Finding ways for a node

Frederik Ramm frederik at remote.org
Fri Jan 25 14:09:36 GMT 2008


Hi,

    I must be overlooking something simple. I cannot get the API to 
return the ways a node is in, although this should be supported (and I 
can see the code in the way controller).

Example:

fred at lambert:~$ wget -qO- http://www.openstreetmap.org/api/0.5/way/9212234
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.5" generator="OpenStreetMap server">
   <way id="9212234" visible="true" 
timestamp="2007-10-13T16:01:29+01:00" user="DaveHansen">
     <nd ref="68703780"/>
     <nd ref="68658275"/>
     <nd ref="68765777"/>
     <nd ref="68765780"/>
[... edited for brevity ...]
   </way>
</osm>

Now I do the opposite and ask which ways contain the first node:

fred at lambert:~$ wget -O- 
http://www.openstreetmap.org/api/0.5/node/68703780/ways
--15:08:00--  http://www.openstreetmap.org/api/0.5/node/68703780/ways
            => `-'
Resolving www.openstreetmap.org... 128.40.58.202
Connecting to www.openstreetmap.org|128.40.58.202|:80... #connected.
HTTP request sent, awaiting response... 404 Not Found
15:08:00 ERROR 404: Not Found.

What am I doing wrong?

Bye
Frederik






More information about the dev mailing list