This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

My query to retrieve nodes and ways is not returning all the nodes…

0

I am using this query :

"GET /cgi/interpreter?data=[out:json];   (node(20.25527,85.8244,20.26632,85.83685);way(20.25527,85.8244,20.26632,85.83685);node(w)->.x;);out; HTTP/1.1\r\n"

And for example there is this way :

{
  "type": "way",
  "id": 26764919,
  "nodes": [
    293465191,
    293465090,
    293465086,
    293465082,
    293465081
  ],
  "tags": {
    "highway": "secondary"
  }

In the nodes returned by query some nodes in above list eg, 293465086 is missing. So I am unable to completely render the way. Am I using the correct query ? If not what query should I use to render all ways in my bounding box ? Is the above query not returning the nodes out of the bounding box ?

asked 29 Jan '13, 13:34

Anubha's gravatar image

Anubha
31336
accept rate: 0%

edited 29 Jan '13, 13:35


One Answer:

3

Do you execute your query here? Please re-run the query. I get node 293465086 in the results as well as 33 member nodes for way 26764919, so I cannot yet reproduce the problem.

answered 29 Jan '13, 19:40

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

well, thanks so much, the nodes are really all present, so I debugged my code and found out why the nodes were not found. after executing the query, I saved the results in a text file. In that text file, some nodes were not in proper format, eg. { "type": "node", "id": 293454101 1000 / this 1000 value is extra / , "lat": 20.2622200, "lon": 85.8301700 }, and so my program could not parse due to this 1000, this 1000 was inserted unwanted in other places too. my line to write to file fprintf(fp,"%s",&buf[0]); why could this be happening ?

(30 Jan '13, 05:27) Anubha
(30 Jan '13, 06:36) Anubha

OSZAR »