I'm new to working with OSM data and there seem to be a few different ways to download it. I'm looking to download road vector data (ideally globally but a small region works as well) filtered by width such that only large roads wider than a certain threshold (like highways) are included. Which is the best option for this -- the Overpass API? Others?

Thoughts on how to write the query for this are greatly appreciated.

asked 29 Oct '21, 20:22

krt333's gravatar image

krt333
11112
accept rate: 0%

1

I don't know how to help you with your query but as a long-time OSM mapper, I can say that most highways in OSM don't have a defined width associated with them. That is, most of the mappers I know don't use the tag width=*. It's a level of detail that isn't critical for the type of mapping many of us do.

So, while you will certainly get some help in developing a working query here, I doubt whether it will be very useful.

(29 Oct '21, 21:05) AlaskaDave
1

"such that only large roads wider than a certain threshold (like highways) are included" makes me wonder if you are not in fact looking for a highway classification. At least in more developed regions there is a quite differentiated system of highway classification mapped in OSM. Probably your best bet is to filter by the highway tag then.

(30 Oct '21, 13:15) TZorn

width= is not usually tagged, although one may easily measure it on imagery. Even if it is, there are many measures of it (ie whether to include parking and hard shoulder), that not even the uncommonly (at this scale) used width:carriageway= may be reliable enough. Width of carriageway (meaning the traveled lanes only) for a certain number of lanes (lanes=) depends on the design speed (reflected in the legal maxspeed= in operation). The entire roadway (whole paved area) needs to include hard shoulder, which although often assumed in highway=motorway (will need to exclude those without by shoulder!=no) may be under-tagged in other roads as shoulder=. You may also want to think about whether to include short sections of widening for turn lanes at intersections if this detail is present at your country being worked on, or evaluate a continuous length of main lanes only (this is better pre-processed afterwards I guess, as an outsider).

Overpass is obviously easier when working with small areas, or if you don't want to download and set up a local data file. The Overpass query would include combinations of [highway=motorway] (think you want to separately query for =trunk and =primary using different criteria), (if:t[lanes]>=3), (if:t[maxspeed]>=100) (need to use (if:number(t[maxspeed])>65) for mph units in USA), etc.

One official blog post: https://dev.overpass-api.de/blog/numbers.html

permanent link

answered 30 Oct '21, 08:04

Kovoschiz's gravatar image

Kovoschiz
2.4k31146
accept rate: 17%

edited 30 Oct '21, 08:10

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:

×267
×217
×63
×11

question asked: 29 Oct '21, 20:22

question was seen: 500 times

last updated: 30 Oct '21, 13:15

powered by OSQA