1

I'm trying to get all the nodes of one street in a district in Berlin.

I've written the following expression, but it returns all Holteistraße in Germany. Anyone know how I would write a correct syntax?

[out:json];

(
area["Berlin, Friedrichshain"];
way[highway][name="Holteistraße"];
);

out body;
>;
out skel qt;
2

Navigate to overpass-turbo.eu and enter the following the wizard popup:

highway=* and name=Holteistraße in Berlin

This will create the following query, which includes (area.searchArea) as a reference to the previously found area. Also, the area needs to match exactly the existing tagging of a way or relation. area["Berlin, Friedrichshain"]; would simply try to find a way/relation with the key "Berlin, Friedrichshain". Obviously, no such object exists.

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“highway=* and name=Holteistraße in Berlin”
*/
[out:json][timeout:25];
// fetch area “Berlin” to search in
{{geocodeArea:Berlin}}->.searchArea;
// gather results
(
  // query part for: “highway=* and name="Holteistraße"”
  node["highway"]["name"="Holteistraße"](area.searchArea);
  way["highway"]["name"="Holteistraße"](area.searchArea);
  relation["highway"]["name"="Holteistraße"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
  • Thanks, this helped quite a bit. Do you know how I can restrict the search to a district? Holteistraße is fine, but some streets appear twice in Berlin. My second question would be if you know how I can make an api call for 500 different streets? (I'm new to this) Thank you! – vinni Oct 31 '18 at 16:06
  • You need to replace {{geocodeArea:Berlin}}->.searchArea by something like area[boundary=administrative][admin_level=??][name="xyz"] -> .searchArea; see wambachers-osm.website/boundaries for some ideas. For the second one, please ask a new question. – mmd Oct 31 '18 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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