How can I trace a segment of a road and export it as a file (.kml, .shp, etc.) for import into CartoDB or some other map?

asked 08 Jan '15, 20:37

ChuckSherman's gravatar image

ChuckSherman
26112
accept rate: 0%

I appreciate the answers, but I'm still floundering. What I want to do is extract the geocoordinates of a stretch of road, say one mile from point A to point B, so I can add it as a layer to CartoDB (combined with a few other bits of road, eventually) that I will highlight in my CartoDB visualization in a different color. How to I mark the section of road I want? How do I export just that part of the map (with georeferencing). Am I being clear yet?

(09 Jan '15, 20:00) ChuckSherman

The answer is to pull the data required out using something like geoJSON from Overpass as SimonPoole described. You need some means of identifying the specific features you require, such as names, OSM identifiers or some other combination. If OSM features do not precisely match your needs you will need to edit the data (for instance in QGIS). An indication of your level of OSM knowledge may help in providing more information, but most of these tasks have multiple answers on this site.

(10 Jan '15, 17:42) SK53 ♦

OpenStreetMap data is, as the name says, open data provided under an open license, there is no need to trace over a map to extract the data.

If you simply want to get the geometry of a small number of roads you could for example use http://overpass-turbo.eu/ to extract the geometry in geoJSON or other formats. AFAIK CartoDB supports OSM format data in some form directly so likely you don't even have to do that.

Currently there is no (IMHO) reasonable way to directly do what you want, so it would likely boil down to:

  • exporting the required road segments to an editable format (kml, gpx, geoJSON)
  • trimming to the exact length you want
  • importing in to CartoDB

There are at least a dozen variants how you could do this. For example besides what I've already outlined you could simply download the area in JOSM, merge/split the road in question till it has the reuired length and then export as GPX, but likely all will require you to learn something about the OSM data format and available tools.

permanent link

answered 08 Jan '15, 23:07

SimonPoole's gravatar image

SimonPoole ♦
38.0k13284605
accept rate: 19%

edited 10 Jan '15, 13:27

my comment is mis-posted as an answer, below.

(09 Jan '15, 20:11) ChuckSherman

@ChuckSherman: not any more, right?

(09 Jan '15, 20:24) aseerel4c26 ♦

depending on the length of the road, you can also just navigate to the area on the map, and click the export button at the top of the page which will let you downland a .osm file of the map area

permanent link

answered 08 Jan '15, 23:38

DaCor's gravatar image

DaCor
1.3k11028
accept rate: 2%

my comment is mis-posted as an answer, below.

(09 Jan '15, 20:12) ChuckSherman
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:

×277
×179
×37

question asked: 08 Jan '15, 20:37

question was seen: 3,100 times

last updated: 10 Jan '15, 17:42

powered by OSQA