Is it possible to export a single road? If so, how? I am able to successfully export all roads for a given area, but I would rather do 1 road at a time. Please let me know and thank you in advance!

asked 28 Jul '16, 21:43

TonesJones's gravatar image

TonesJones
11112
accept rate: 0%

2

Do you have a specific reason for downloading roads one by one? Usually it more efficient to fetch multiple roads in one go, rather than downloading them one by one (assuming you want to download all roads in an area anyway and your area is not too large).

(30 Jul '16, 18:47) mmd
1

You can also download multiple objects in one go using their id rather than using a bounding box.

(02 Aug '16, 10:11) Vincent de P... ♦

You can fetch elements by id using Overpass API:

http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_element_id

The simplest script to retrieve a way would be something like this:

way(17500233);
out geom;

Here's that query in Overpass Turbo, an IDE for Overpass API:

http://overpass-turbo.eu/s/hyA

You can use it to experiment and see if Overpass is suitable for your needs. Once you have your query worked out, you can fetch the ways directly from Overpass API.

permanent link

answered 28 Jul '16, 22:09

maxerickson's gravatar image

maxerickson
10.8k1073151
accept rate: 31%

(29 Jul '16, 07:55) scai ♦
2

Remember that one "road" in everyday speech can be made of multiple "ways" in OSM data. Overpass could help downloading all ways of one "road" but you'll have to tweak the query on a case by case basis.

(02 Aug '16, 10:07) Vincent de P... ♦
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:

×279
×183
×2

question asked: 28 Jul '16, 21:43

question was seen: 2,089 times

last updated: 02 Aug '16, 10:11

powered by OSQA