1

I wanted to check the feasibility of a doubt I am stuck with in Overpass query. I have created a simple overpass query to fetch data of one road,

[timeout:300]; (way[highway]({{bbox}});); out geom;

and I got result as which gives 2 nodes with a ref id but those reference id are not present in details anywhere in the output.

<way id="256582511"> <bounds minlat="53.6052931" minlon="10.2005595" maxlat="53.6053272" maxlon="10.2044249"/> <nd ref="331340954" lat="53.6052931" lon="10.2044249"/> <nd ref="331278759" lat="53.6053272" lon="10.2005595"/> <tag k="cycleway:left" v="track"/> <tag k="highway" v="tertiary"/> <tag k="maxspeed" v="70"/> <tag k="name" v="Hauptstraße"/> <tag k="ref" v="K 107"/> <tag k="surface" v="asphalt"/> </way>

Now for same bounding box-bbox, I exported data through osm.org I get data as below. This data contains details for the reference id, which is not the same in above query result.

<node version="2" lon="10.2040022" lat="53.6049916" uid="149203" user="uebi64" timestamp="2010-05-12T21:42:16Z" changeset="4681402" visible="true" id="731150522"/> <node version="2" lon="10.2042253" lat="53.6049897" uid="149203" user="uebi64" timestamp="2010-05-12T21:42:16Z" changeset="4681402" visible="true" id="731150523"/> <node version="2" lon="10.2040041" lat="53.6050694" uid="149203" user="uebi64" timestamp="2010-05-12T21:42:16Z" changeset="4681402" visible="true" id="731150532"/> <node version="2" lon="10.2042272" lat="53.6050675" uid="149203" user="uebi64" timestamp="2010-05-12T21:42:16Z" changeset="4681402" visible="true" id="731150534"/> <way version="2" uid="149203" user="uebi64" timestamp="2010-05-12T21:55:20Z" changeset="4681531" visible="true" id="58993281"> <nd ref="731150532"/> <nd ref="731150522"/> <nd ref="731150523"/> <nd ref="731150534"/> <nd ref="731150532"/> <tag v="yes" k="building"/> </way>

I am trying to use the data from Overpass query for further processing but because it has no data related to the reference id. Is it possible in the Overpass query to fetch the details of the node references?

1 Answer 1

1

See https://wiki.openstreetmap.org/wiki/Overpass_turbo for documentation. For start I would use wizard described at https://wiki.openstreetmap.org/wiki/Overpass_turbo/Wizard

In this case: click "wizard" button, type highway=* and click "build and run query" button.

Note that such generated query includes

>; out skel qt;

that is documented at https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Recurse_down_.28.3E.29 and https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#out

Note: I attempted to create Overpass Turbo tutorial that I published at https://mapsaregreat.com/turbo - it may or may be not helpful for people starting with this tool.

1
  • Thanks for the response. I had used the recurse clause in my main query and tried with an additional >; before the out meta command and it gives the necessary node details but I am still working on getting all the data. This was helpful to initiate new thoughts though! thanks again.
    – akzhere
    Oct 24, 2018 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.