[OSM-dev] why does api not return nodes that are referenced from ways?

Timo Lindfors timo.lindfors at iki.fi
Tue Feb 5 23:08:31 GMT 2008


Hi,

while trying to use pyroute I noticed it died with

Handling event route:clicked
Traceback (most recent call last):
  File "gui.py", line 349, in <lambda>
    event_box.connect("button_release_event", lambda w,e: self.released(e))
  File "gui.py", line 390, in released
    self.mapWidget.click(event.x, event.y)
  File "gui.py", line 196, in click
    if(self.m['overlay'].handleClick(x,y)):
  File "/home/lindi/tmp/pyroute/overlay.py", line 39, in handleClick
    if(cell.handleClick(x,y)):
  File "/home/lindi/tmp/pyroute/overlayArea.py", line 154, in handleClick
    self.modules['events'].handleEvent(self.event)
  File "/home/lindi/tmp/pyroute/events.py", line 142, in handleEvent
    function(params)
  File "/home/lindi/tmp/pyroute/events.py", line 93, in handle_route
    router.setStartLL(ownpos['lat'], ownpos['lon'], transport)
  File "/home/lindi/tmp/pyroute/routeOrDirect.py", line 17, in setStartLL
    self.route['startnode'] = self.data.findNode(lat,lon,transport)
  File "/home/lindi/tmp/pyroute/loadOsm.py", line 253, in findNode
    n = self.nodes[id]
KeyError: 94153236

It seems that 

http://osmxapi.hypercube.telascience.org/api/0.5/way%5bbbox=-0.3275,50.9865,0.0725,51.3865%5d%5bhighway%7crailway%7cwaterway=*%5d

contains a way

  <way id='10660210' timestamp='2007-10-31T21:45:41Z'>^M
    <nd ref='20576167'/>^M
    <nd ref='20576168'/>^M
    <nd ref='20576169'/>^M
    <nd ref='20576171'/>^M
    <nd ref='20576172'/>^M
    <nd ref='20576173'/>^M
    <nd ref='20576174'/>^M
    <nd ref='94155556'/>^M
    <nd ref='20576175'/>^M
    <nd ref='20576199'/>^M
    <nd ref='20576212'/>^M
    <nd ref='20576213'/>^M
    <nd ref='20576215'/>^M
    <nd ref='94159182'/>^M
    <nd ref='20576216'/>^M
    <nd ref='20576218'/>^M
    <nd ref='20576219'/>^M
    <nd ref='20576220'/>^M
    <nd ref='20576221'/>^M
    <nd ref='20576224'/>^M
    <nd ref='20576225'/>^M
    <nd ref='20576226'/>^M
    <nd ref='20576227'/>^M
    <nd ref='20576229'/>^M
    <nd ref='20576231'/>^M
    <nd ref='20576232'/>^M
    <nd ref='20576234'/>^M
    <nd ref='20576235'/>^M
    <nd ref='20576236'/>^M
    <nd ref='20576238'/>^M
    <nd ref='20576239'/>^M
    <nd ref='20576241'/>^M
    <nd ref='20576242'/>^M
    <nd ref='20576243'/>^M
    <nd ref='20576246'/>^M
    <nd ref='94153261'/>^M
    <nd ref='94153262'/>^M
    <nd ref='94153263'/>^M
    <nd ref='94153236'/>^M
    <nd ref='94154318'/>^M
    <nd ref='94154319'/>^M
    <nd ref='94154321'/>^M
    <tag k='highway' v='tertiary'/>^M
    <tag k='name' v='Fairchildes Road'/>^M
  </way>^M

that references node 94153236 but that node is not defined in the
reply. The specification at

http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.5

howevery says that it'd return

"any nodes outside the bounding box that the ways may reference."

Is osmxapi.hypercube.telascience.org breaking the specification or am
I (or pyroute) doing something wrong?

best regards,
Timo Lindfors




More information about the dev mailing list