[josm-dev] Displaying the properties of GPX points

Marko Mäkelä marko.makela at iki.fi
Sat Mar 14 18:04:20 GMT 2009


On Tue, Mar 10, 2009 at 02:07:41PM +0200, Marko Mäkelä wrote:
> As a GNU/Linux user, I've been thinking of using JOSM as a "poor man's
> Garmin Training Center" that would display me the elevation profiles and
> heart rate and cadence statistics of my bike rides.  Displaying the
> elevation profiles of GPX tracks would be a good start.  Any suggestions?
> As far as I understand, I couldn't use the Garmin software even if I wanted,
> because it apparently doesn't run under WINE.
> 
> I'm aware of http://viking.sourceforge.net, which can display the elevation
> data on the GPX trace itself.  I'd prefer something that displayed the
> data in a mouse tooltip when the mouse cursor is positioned over the track
> and also in a 2D graph with the time on the horizontal axis and elevation
> (cadence, heart rate, speed, whatever things that can be derived from the
> data) in different colours on the vertical axis.

I was also pointed to ael, which is a Tcl/Tk application, partially a
front-end to gpsbabel.  It was slow and seemed to be geared towards a
real-time connection to a GPS receiver.  My Garmin Edge 705 only implements
usb-storage, FAT and XML-based interchange formats.  It doesn't send any
NMEA sentences or anything like that.

> I guess I could implement a mouse tooltip for the GPX layer that would
> display the timestamp, longitude, latitude, elevation, and possibly other
> attributes.  I have no idea how to combine the above mentioned 2D graph
> with JOSM (or any map viewer, for that matter).  Maybe right-clicking a
> point on the GPX layer could pop up a scrollable graph window that would
> show the data centered around the selected point.

I studied the code today, and it looks like the selection only works for
objects of classes derived from OsmPrimitive.  Neither the GPX layer nor
the GPX data derives from OsmPrimitive.  This is why GPX points can't be
selected or right-clicked in JOSM.  I fear that converting the data to
OsmPrimitive objects would cost too much memory.

In the JOSM framework, I could convert points based on query expressions
to additional layers, e.g., points where I'm on the top of a hill.
(Something similar to "MarkersFromNamedPoints".)  I could possibly also
render the layer in different colors, e.g,. based on the speed.

Given the difficulty of selecting GPX track points in JOSM, I think I
will try to implement this in a map viewer application.

	Marko




More information about the josm-dev mailing list