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

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 '21, 12:18

Ahmad%20Ataei's gravatar image

Ahmad Ataei
31114
accept rate: 0%


permanent link

answered 17 Jun '21, 01:03

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

Thanks Dave. I solved my problem using this link.

Best,,,

(21 Jun '21, 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 '21, 15:14

TZorn's gravatar image

TZorn
12.3k764225
accept rate: 15%

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

(17 Jun '21, 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 '21, 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:

×483
×228
×147
×13
×11

question asked: 16 Jun '21, 12:18

question was seen: 1,368 times

last updated: 21 Jun '21, 10:30

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