Trackfield

Component ID

235246

Component name

Trackfield

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

6480

Component created

Component changed

Component body

A CCK field type to store lists of co-ordinates, or tracks. These tracks are intended to be visualised on maps, plotted as distance/altitude profiles, have statistics derived from them, etc.

The module has been created in what is hoped is a flexible enough manner to allow multiple input formats to be used, and to allow track data to be shown in many different ways. The 'base' trackfield CCK field knows about latitude, longitude, altitude and distance. This system is flexible enough to allow distance/altitude pairs to be entered without latitude/longitude (this entry could be via the trackfield_csv module). This would be useful for someone with a cycle computer with altimeter but no GPS who wishes to graph hill profiles. Although of course the input modules know how to convert latitude/longitude pairs into distance data when it is entered.

User data handling will be catered for later, an example of which is an athlete who might want to record heart rate and time information (from which speed can be derived) at each co-ordinate.

This field is slightly different to other CCK types by way of only having one internal formatter ('unformatted') which is very ugly and most people will want to leave hidden. Visualisation is left to separate CCK field modules (some of which are bundled). These visual field types have no input widget. Instead, when creating a content type or field, if one of these these visualisation CCK field types is created it needs to be configured to reference a trackfield within the same content type for data to be displayed.

Things have been done this way because the vast number of display possibilities would otherwise become unwieldy to configure if just one field type were used.

At the moment the following modules are bundled here:

Required:

  • trackfield - the 'core' field with data storage rules. Standalone it cannot accept input data nor display it.

Optional Input:

  • trackfield_crs - gives trackfield the ability to accept text in CRS (Garmin course) format.
  • trackfield_csv - gives trackfield the ability to accept text in CSV format.
  • trackfield_kml - gives trackfield the ability to accept text in KML format.
  • trackfield_gpx - gives trackfield the ability to accept text in GPX format.
  • trackfield_file - instead of the input field, data for other input handlers (CSV, KML, GPX, etc.) can be read from a file attached to the node.
  • trackfield_fetch_altitude - enriches trackfield input with altitude data where not provided or partial.

Optional Output/Display:

  • trackfield_graph - creates graphs (eg. distance/altitude) from a trackfield. Has the ability to normalise/compare more than one field. The JpGraph library is required for graph visualisation.
  • trackfield_map - uses the gmap module to display a trackfield.
  • trackfield_stats - create any number of fields with statistics derived from trackfield data. Distance, gradient (where altitude is available), max speed (where time is available), etc, etc. Users may input statistics manually for nodes they wish to create and store these details in, but for which no source track data is available.
  • trackfield_kml_out - include trackfield in KML output where latitude/longitude are available. Currently requires development version of KML module (see #235986: 'kml item' hook needs more flexibility).

The following modules are planned (not available as yet):

Planned Input:

  • trackfield_select - graphical popup (javascript with interactive sliders) to allow part or all of an existing trackfield to be copied to another.

Demonstration Sites

This module is in production use on NoBMoB.com:

A view with map/profile in a teaser: http://nobmob.com/node/5917/tracks
The same data exported as KML: http://nobmob.com/node/5917/kml (view in Google Maps).
Secondary module using trackfield to compare profiles: http://nobmob.com/hill_profiles/4500+4503