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

hi,

i want to start working with gps data to create routes and build maps of my journeys for blogs, travelogues, etc. i also want to create future journeys for planning (i suppose like itineraries)...

i know a journey consists of trackpoints, so that a very simple record of journey may look (in principle) like::

<journey>
<trackpoint>
 <lat>x</lat>
 <long>y</long>
 <alt>z</alt>
 <timestamp>
   <date>yyyymmdd</date>
   <time>hh:mm:ss.xxx</time>
 </timestamp>
</trackpoint>
<trackpoint>
 <lat>x</lat>
 <long>y</long>
 <alt>z</alt>
 <timestamp>
   <date>yyyymmdd</date>
   <time>hh:mm:ss.xxx</time>
 </timestamp>
</trackpoint>
   ......
</journey>

i appreciate also i may have to translate co-ords from different formats, and time from utc(or maybe just leave as utc), but what i cannot find is a basics howto that starts at this simple level and builds from there, showing me the correct standard structure to use.

i want at start to be able to represent my journeys in gpx, kml, osm_xml formats, so i want to know hot to take the raw data and translate it into these formats e.g. via an api:

gpx_file.gpx = journey.get_gpx(raw_journey_data)

osm_file.gpx = journey.get_osm(raw_journey_data)

obviously, then i need to understand these standards.

i have tried reading around, but there is so much about getting data out from a map, and i can't find a good 'basics' guide to plotting a diary event {ie a journey over a set time}... help?...

thanks,

iain

asked 27 Oct '13, 14:09

iainmacgigamac's gravatar image

iainmacgigamac
11112
accept rate: 0%

edited 27 Oct '13, 15:55

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


I highly recommend to use a manual solution ("drawing by hand") to do journey planing
http://wiki.openstreetmap.org/wiki/Maps
This is still not a usecase that is currently well supported, but cause a lot of manual processing and a lot of tools:

  1. Create .GPX files using a custom script or what ever fits best
  2. You need a tool/service that supports input a GPX track and does a routing that creates a route along the track for the right vehicle. Otherwise you might manually create via points
    http://wiki.openstreetmap.org/wiki/Software/Desktop#Navigating_features ("follow predefined track")
    http://wiki.openstreetmap.org/wiki/Routing/online_routers
  3. Get from the directions the OSM ids from the routing graph.
  4. Download OSM data in the area, match IDs and create a map style with highlighting this features
permanent link

answered 21 Nov '13, 16:25

iii's gravatar image

iii
4.9k84082
accept rate: 10%

OSRM, the most popular routing software for OSM data, allows you to export a GPX file from a planned journey. You could then write a script in the programming language of your choice to add the additional data you're talking about.

permanent link

answered 21 Nov '13, 16:33

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

I can't speak to displaying routes, but I may have some partial answers.

For converting your .gpx files into other formats I would recommend GPSBabel (http://www.gpsbabel.org/) which seems to speak just about every GPS format in the world. For complicated operations the documentation can be rather opaque, but for simple things it's easy enough to use. It's primarily a command line utility, so it shouldn't be difficult to call it from whatever you're planning on writing. You seem mostly interested in writing your own utilities, but you might not need to reinvent the wheel.

As far as planned gpx routes go, other than the things already mentioned in other answers, I do know that OSMAnd can save GPX out gpx routes based on what it uses for navigation.

permanent link

answered 20 Dec '13, 14:45

InsertUser's gravatar image

InsertUser
11.0k1369185
accept rate: 19%

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:

×2

question asked: 27 Oct '13, 14:09

question was seen: 3,073 times

last updated: 20 Dec '13, 14:45

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