NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm new at OpenStreetMap and overpass-turbo i did write a code to extract residential from the country of Qatar and it works fine but if I would like to define a specific location based on west, east, north, south location like what we do in OpenStreetMap

    /*
This has been generated by the overpass-turbo wizard.
The original search was:
“highway='cycleway' in qatar”
*/
[out:json][timeout:25];
// fetch area “qatar” to search in
{{geocodeArea:qatar}}->.searchArea;
// gather results
(
  // query part for: “highway=cycleway”
  node["highway"="residential"](area.searchArea);
  way["highway"="residential"](area.searchArea);
  relation["highway"="residential"](area.searchArea);
);
// print results
out body;
>;
out skel qt;

i tried to change the {geocodearea:qatar} to {25.2552,51.5635,25.2433,51.5434} but it didn't work how can i define a manual location ?

asked 18 Dec '20, 20:28

rabeeqasem's gravatar image

rabeeqasem
318811
accept rate: 0%

edited 18 Dec '20, 20:30


There's 2 ways to do a bounding box query, either for the whole script, or for each query part.

For the entire script, put something like this at the beginning (I've not checked the order):

[bbox: 25.2552,51.5635,25.2433,51.5434];

To do it on an individual query, put the corners inside parentheses (again, I didn't check if you have the correct order for Overpass API bounding boxes):

node(25.2552,51.5635,25.2433,51.5434)[highway=residential];
permanent link

answered 18 Dec '20, 21:04

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

i interested in the whole script so if i understand you mean I should bot the [boxx:...] after [out:json][timeout:25]; and remove all the searchArea part ?

(18 Dec '20, 21:35) rabeeqasem

Yeah, that should do it.

(18 Dec '20, 22:53) maxerickson

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×362
×228

question asked: 18 Dec '20, 20:28

question was seen: 1,141 times

last updated: 18 Dec '20, 22:53

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum