Skip to content

Support for GPX #14

@labra

Description

@labra

@timbl has suggested to include support for GPX as it is a popular format supported by lots of devices. In order to do that there are several possibilities to consider:

  1. Create an RDF-based representation of the GPX format. I think the latest (1.1) specification is defined here. One possibility which doesn't seem difficult is to represent that spec using ShEx.

  2. Another possibility could be to translate a subset of the GPX format to Turtle. That's the approach followd by this sed program.

  3. Finally, another possibility could be to include the raw GPX file as the value in a Turtle file that represents the routes and increasingly add more metadata to it. The solution could be to start with something like:

:myRoute a viade:Route   ;
   viade:source [  
     viade:format viade:GPX ;
     viade:value """<gpx version="1.1" creator="Runkeeper - http://www.runkeeper.com"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.topografix.com/GPX/1/1"
  xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
  xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1">
<wpt lat="37.778259000" lon="-122.391386000"><ele>3.4</ele><time>2016-06-17T23:41:03Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>171</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></wpt>
<wpt lat="37.778194000" lon="-122.391226000"><ele>3.4</ele><time>2016-06-17T23:41:13Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>171</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></wpt>
<wpt lat="37.778297000" lon="-122.391174000"><ele>3.4</ele><time>2016-06-17T23:41:18Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>171</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></wpt>
<wpt lat="37.778378000" lon="-122.391117000"><ele>3.4</ele><time>2016-06-17T23:41:23Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>171</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></wpt>
<wpt lat="37.778449000" lon="-122.391039000"><ele>3.4</ele><time>2016-06-17T23:41:26Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>171</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></wpt>
<wpt lat="37.778525000" lon="-122.390942000"><ele>3.4</ele><time>2016-06-17T23:41:29Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>171</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></wpt>
</gpx>"""^^rdf:XMLLiteral  
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions