{"id":2727,"date":"2016-08-31T11:25:38","date_gmt":"2016-08-31T02:25:38","guid":{"rendered":"https:\/\/regex.info\/blog\/2016-08-31\/2727"},"modified":"2016-08-31T11:25:38","modified_gmt":"2016-08-31T02:25:38","slug":"getting-garmin-software-virb-edit-etc-to-work-with-your-gpx-files","status":"publish","type":"post","link":"https:\/\/regex.info\/blog\/2016-08-31\/2727","title":{"rendered":"Getting Garmin Software (VIRB Edit, etc.) to Work with Your GPX Files"},"content":{"rendered":"\n\n<div style='margin-bottom:30px' class='ic' itemscope itemtype='http:\/\/schema.org\/Photograph'><a name=\"i007972\" href='\/i\/JF7_007972.jpg' itemprop='image'\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JF7_007972_sm.jpg\" width=\"690\" height=\"459\"\nalt=\"&amp;#8220;&amp;nbsp; If the intercom doesn't seem to be working please push the bell &amp;nbsp;&amp;#8221; &amp;mdash; detail of the front wall of this house &amp;mdash; -- Kyoto, Japan -- Copyright 2008 Jeffrey Friedl, https:\/\/regex.info\/blog\/ -- This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 4.0 International License http:\/\/creativecommons.org\/licenses\/by-nc\/4.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\nid=\"i007972\"\ntitle=\"&amp;#8220;&amp;nbsp; If the intercom doesn't seem to be working please push the bell &amp;nbsp;&amp;#8221; &amp;mdash; detail of the front wall of this house &amp;mdash; -- Kyoto, Japan -- Copyright 2008 Jeffrey Friedl, https:\/\/regex.info\/blog\/ -- This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 4.0 International License http:\/\/creativecommons.org\/licenses\/by-nc\/4.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D700 + Nikkor 24-70mm f\/2.8 @ 38mm &mdash; <sup>1<\/sup><big>\/<\/big>200 sec, <span class='f'>f<\/span>\/6.3, ISO 1800 &mdash;\n<a href='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJF7_007972.jpg'>map &amp; image data<\/a> &mdash; <a href='\/blog\/proximity\/i\/JF7_007972.jpg'>nearby photos<\/a><\/span>\n\n<table align='center'>\n<tr>\n  <td valign='bottom'><span style='font-size:300%' class='QO'>&#8220;&nbsp;<\/span><\/td>\n  <td style='font-size:150%'>\n     <i>If the intercom doesn't seem to be working\n     <br\/>please push the bell<\/i>\n  <\/td>\n  <td valign='bottom'><span style='font-size:300%' class='QC'>&nbsp;&#8221;<\/span><\/td>\n <\/tr>\n<tr><td colspan='3' style='padding-top:10px'>&mdash; detail of the front wall of <a href='\/blog\/2008-12-29\/1081'>this house<\/a> in Kyoto, Japan&mdash;<\/td><\/tr>\n<\/table>\n<meta itemprop='url' content='http:\/\/regex.info\/i\/JF7_007972.jpg'\/>\n<meta itemprop='creator' content='Jeffrey Friedl'\/>\n<meta itemprop='copyrightHolder' content='Jeffrey Friedl'\/>\n<meta itemprop='dateCreated' content='2008-12-29'\/>\n<meta itemprop='about' content=\"&amp;#8220;&amp;nbsp; If the intercom doesn't seem to be working please push the bell &amp;nbsp;&amp;#8221; &amp;mdash; detail of the front wall of this house &amp;mdash; -- Kyoto, Japan -- Copyright 2008 Jeffrey Friedl, https:\/\/regex.info\/blog\/ -- This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 4.0 International License http:\/\/creativecommons.org\/licenses\/by-nc\/4.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\/><\/div>\n\n\n\n\n\n<p>I've recently started futzing with video on my bike rides, having posted <span class='nobr'>a few<\/span> on <span\nclass='QO'>&#8220;<\/span><a class='pt' href='\/blog\/2016-08-29\/2725'>Lovely Bicycle Ride Revisiting Uji\nCountryside Photographed Five Years Ago<\/a><span class='QC'>&#8221;<\/span> the other day, including <a\nhref='https:\/\/www.youtube.com\/watch?v=iiCD0Ksocmg'>this fast descent<\/a> down some twisty mountains and into the flats.<\/p>\n\n<p>I had some trouble getting Garmin software (<a href='http:\/\/www.garmin.com\/en-US\/shop\/downloads\/virb-edit'>VIRB Edit<\/a>, <a\nhref='http:\/\/www.garmin.com\/en-US\/shop\/downloads\/basecamp'>Garmin BaseCamp<\/a>, and <a\nhref='https:\/\/connect.garmin.com\/modern\/'>Garmin Connect<\/a>) to work with my GPX files, or as Garmin has lately taken to re-brand\nin their own silly name, <span class='QO'>&#8220;<\/span>G-Metrix<span class='QC'>&#8221;<\/span> data files.<\/p>\n\n<p>When trying to import GPX files, <span class='nobr'>I'd get a<\/span> terse, frustrating <span\nclass='QO'>&#8220;<\/span><i>Failed to read file<\/i><span class='QC'>&#8221;<\/span> or <span class='QO'>&#8220;<\/span><i>... is not\n<span class='nobr'>a valid<\/span> GPX file and could not be opened<\/i><span class='QC'>&#8221;<\/span> message. After much\nexperimenting <span class='nobr'>I found<\/span> that in each <tt>&lt;trkpt&gt;<\/tt> element, Garmin requires the\n<tt>&lt;ele&gt;<\/tt> to come before the <tt>&lt;time&gt;<\/tt>. <span class='nobr'>Get anything<\/span> out of order and it\nbails.<\/p>\n\n<p>I ran a little script to ensure <tt>&lt;ele&gt;<\/tt> came first, and they were imported without complaint.<\/p>\n\n<p>What's most shocking to me about this is that <i>Garmin isn't wrong<\/i>. I've been working with GPX files for more than <span\nclass='nobr'>a decade,<\/span> and it never even occurred to me that the various order-can't-possibly-matter sup-parts of a\n<tt>&lt;trkpt&gt;<\/tt> might actually be required in <span class='nobr'>a specific<\/span> order, but inexplicably, that's how <a\nhref='http:\/\/www.topografix.com\/GPX\/1\/1\/#type_ptType_scbox'>the GPX standard<\/a> was written:<\/p>\n\n\n<pre style='margin-left:2em'>\n&lt;xsd:<span style='color:#800'>sequence<\/span>&gt;\n  &lt;-- <i style='color:red'>elements must appear in this order<\/i> --&gt;\n  &lt;xsd:element name=\"<b>ele<\/b>\" type=\"xsd:decimal\" minOccurs=\"0\"\/&gt;\n  &lt;xsd:element name=\"<b>time<\/b>\" type=\"xsd:dateTime\" minOccurs=\"0\"\/&gt;\n&lt;\/xsd:<span style='color:#800'>sequence<\/span>&gt;\n<\/pre>\n\n<p>This restriction on ordering seems utterly nonsensical... <span class='nobr'>I'd guess<\/span> it's because whoever created the standard\nwas simply lazy as <span class='nobr'>a software<\/span> engineer. <span class='nobr'>In any case<\/span>, the standard is the standard.<\/p>\n\n<p>It turns out that other artificial orders are mandated, such as the metadata summary <i>requiring<\/i> the <tt>author<\/tt>\n(if there is one) before the <tt>copyright<\/tt> (if there is one). <span class='nobr'>I always<\/span> thought that the GPX standard was <span class='nobr'>a bit<\/span> wonky\nas far as XML standards go, but this puts it into the decidedly <span class='QO'>&#8220;<\/span>bizarre<span class='QC'>&#8221;<\/span> category.<\/p>\n\n<p>Anyway, as much as Garmin continues to deserve the world's ire for design in both hardware and software that pushes new limits\nin just how poor <span class='nobr'>a user<\/span> experience one can endure, in this issue they are technically not <span\nclass='QO'>&#8220;<\/span>wrong<span class='QC'>&#8221;<\/span>. Yes, it'd be nice if they were generous in what they read, but I'm\nsure their own <span class='QO'>&#8220;<\/span>G-Matrix<span class='QC'>&#8221;<\/span> files are standard conforming, and\nconsidering that their software is free, working with their own stuff seems to be <span class='nobr'>a reasonable<\/span> lower\nbar.<\/p>\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>I've recently started futzing with video on my bike rides, having posted a few on \"Lovely Bicycle Ride Revisiting Uji Countryside Photographed Five Years Ago\" the other day, including this fast descent down some twisty mountains and into the flats.<\/p> <p>I had some trouble getting Garmin software (VIRB Edit, Garmin BaseCamp, and Garmin Connect) to work with my GPX files, or as Garmin has lately taken to re-brand in their own silly name, \"G-Metrix\" data files.<\/p> <p>When trying to import GPX files, I'd get a terse, frustrating \"Failed to read file\" or \"... is not a valid GPX file and [...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,4],"tags":[],"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/2727"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=2727"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/2727\/revisions"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=2727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/categories?post=2727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/tags?post=2727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}