Hello everybody, I want to make an overpass query which shows me the sidewalks which the width attribute is for example 0.80 m to 0.90 m for them.


( way["footway"="sidewalk"] ["width"="0.81 m"] ({{bbox}}); );


the above mentioned code shows only the side walks with the 0.81 m of width. how can I modify my code to search for a range of widths?

thank you in advance

asked 16 Jun, 12:18

Ahmad%20Ataei's gravatar image

Ahmad Ataei
3114
accept rate: 0%


permanent link

answered 17 Jun, 01:03

DaveF's gravatar image

DaveF
2.2k6477106
accept rate: 10%

Thanks Dave. I solved my problem using this link.

Best,,,

(21 Jun, 10:24) Ahmad Ataei

Not sure if there is something like range matching but I guess you could use a regular expression if you are not too picky about the ranges. To find 0.8 to 0.99m you could for example look for

( way["footway"="sidewalk"]["width"~"^0\.[89]"] ({{bbox}}); );

That would find all values starting with 0.8 or 0.9.

Unfortunately very few sidewalks around here have a width tagged at all so I could not test that expression. Can you point to the aeria you are exploring?

permanent link

answered 16 Jun, 15:14

TZorn's gravatar image

TZorn
9.8k545182
accept rate: 14%

Dave's suggestion with the numerical evaluation is probably the better approach.

(17 Jun, 09:08) TZorn

Thank you for your answer. as you mentioned dave's suggestion is more precise and generalised but your suggestion was working in my case. I'm Workington this area: https://www.openstreetmap.org/way/404140219

Best,,,

(21 Jun, 10:30) Ahmad Ataei
Your answer
toggle preview

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:

×431
×178
×139
×11
×8

question asked: 16 Jun, 12:18

question was seen: 235 times

last updated: 21 Jun, 10:30

powered by OSQA