Skip to main content
Solved

Why don't I see "power" attribute from a GPX file?


ronmak
Contributor
Forum|alt.badge.img

It's been a while since I posted but I am doing something different and after spending some time looking in the forums for a solution, I thought I would just post it.  It's probably something simple, but I have limited experience with FME.

 

I downloaded a GPX file from my bike computer and want to do some data processing on it, but when I view the file in FME Inspector, I am missing the "power" attribute which appears in the GPS as shown below.  

   <trkpt lat="43.7513380" lon="-80.5606200">
    <ele>335.6</ele>
    <time>2023-01-07T13:02:24Z</time>
    <extensions>
     <power>36</power>
     <gpxtpx:TrackPointExtension>
      <gpxtpx:atemp>20</gpxtpx:atemp>
      <gpxtpx:hr>89</gpxtpx:hr>
      <gpxtpx:cad>51</gpxtpx:cad>
     </gpxtpx:TrackPointExtension>
    </extensions>
   </trkpt>

I do get the time, temperature, hr and cad, but not <power>.

I expect it has something to with the fact that it is not in the <gpxtpx> section, but then neither is time or elevation, but I see them in FME.  How do I expose <power>?

Best answer by dustin

Use the XML reader instead of the GPX reader. You will need to set the Elements to Match parameter to the trkpt element.

image

View original
Did this help you find an answer to your question?

6 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • January 7, 2023

Hello @ronmak​ 

 

Please, could you share your data?


ronmak
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • January 8, 2023
danilo_fme wrote:

Hello @ronmak​ 

 

Please, could you share your data?

Here is the data. Don't get too hung up on the spatial data. It is from a bike computer on a trainer that wasnt really going anywhere!


nielsgerrits
VIP

I do not have an answer, but as it is XML, it is not too hard do it yourself. XMLFragmenter to get the trackpoints using gpx/trk/trkseg/trkpt as elements to match, enable flattening and you're done.


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • Best Answer
  • January 9, 2023

Use the XML reader instead of the GPX reader. You will need to set the Elements to Match parameter to the trkpt element.

image


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • January 9, 2023
dustin wrote:

Use the XML reader instead of the GPX reader. You will need to set the Elements to Match parameter to the trkpt element.

image

Great solution. Congratulations!


ronmak
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • January 10, 2023
dustin wrote:

Use the XML reader instead of the GPX reader. You will need to set the Elements to Match parameter to the trkpt element.

image

resulting chartThanks! It works great.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings