The Global Positioning System (GPS) has revolutionized many things, and has become an integral part of many mobile computing scenarios. Also, it has become essential for many outdoor and sports enthusiast, or simply fitness-interested people, by using GPS-enabled wearables (such as sports- and smartwatches). However, the exchange of GPS-oriented data is still stuck in XML-land, which an increasing number of people find inconvenient.
The recently started IETF GeoJSON group (which I am co-chairing) has the goal to bring GeoJSON to RFC status. GeoJSON has been around for a while, and routinely people try to use it for GPS-oriented data such as GPS tracks and sports activities. However, GeoJSON really hasn't been designed for that; it is centered around the idea of geographic features, which of course do have some overlap, but are a different use case.
However, it has become clear that there is some demand for a JSON-based and modern data format for GPS data, that can be used for GPS tracks and activities. The existing XML formats GPX and TCX are based on the increasingly obsolete XML toolset, and also don't have the extensibility and openness that one would like to see in a modern data format.
What I hereby propose is to start work on a JSON-based track and activity format. I am calling it JSON Track/Training (JTT) Format, and like many things these days, it lives on GitHub. My approach for this is to start simple, and hopefully also keep it (relatively) simple. A simple test GPX from the repo is currently transformed into the following JTT:
{ "JTT" : [
{ "track" : {
"title" : "Test Activity",
"desc" : "Simple test activity walking around the block with a heart rate monitor, stopping once, and marking one lap. Recorded with Garmin Fenix 3, uploaded to Garmin Connect, and exported as GPX and TCX. Both exports are crippled because they do not contain all data fields of the activity.",
"segments" : [
{ "data-fields" : ["latitude", "longitude", "elevation", "time", "temperature", "HR" ] },
[
[ 47.407614681869745, 8.553115781396627, 451.79998779296875, "2015-11-13T12:57:24.000Z", 28.0, 76],
[ 47.40762138739228, 8.553108656778932, 451.0, "2015-11-13T12:57:25.000Z", 28.0, 76],
[ 47.407626835629344, 8.553094072267413, 450.0, "2015-11-13T12:57:26.000Z", 28.0, 76],
[ 47.407668409869075, 8.552960716187954, 449.0, "2015-11-13T12:57:33.000Z", 28.0, 78],
[ 47.40770772099495, 8.552867090329528, 448.79998779296875, "2015-11-13T12:57:39.000Z", 28.0, 75],...
The complete JSON example is available as a GitHub Gist. One of the main ideas is to keep the overall GPX structure, but make the format more compact, by using arrays and a specification of used data types. The idea for these is that there could be a registry for well-known data types, but other data types (identified by URI instead of well-known registry values, following the model of RFC 5988) could be added by applications that need to serialize additional data beyond the standard types.
The current JTT really is nothing but a starting point, and my attempt to get some momentum going to start work on a JSON-based format for GPS data. While I am interested in these applications myself, the other goal is to reduce the pressure on GeoJSON a little, so that GeoJSON can focus on what it is good at.
Any and all comments on this initiative in general, and on the JTT "format" (it's mostly an idea so far) are very welcome. My goal is to first work on converters from GPX and TCX, and see how their models can drive the evolution of JTT. Of course, feedback from application and service developers in that space would be incredibly valuable. For now, maybe collaboration just via GitHub is good enough, so let's get started to create a JSON-based GPS data format!
Comments