Solved

GPX Reader and SHP Writer with GPXX extensions

  • 6 January 2020
  • 8 replies
  • 22 views

Badge

Hello :)

 

I'm new to FME and I have a question which I didn't found answered yet in your discussion board:

 

I want to read my gpx files and write them into a esri shp file. The gpx files are containing gpxx extensions (heartrate "hr" and a temperature "atemp") but those I cant read. The normal gpx stuff is transferred to the shp file. I will give you a short code snippet from one of my gpx files.

 

Can anyone try to help me ?! Thank you :D

 

These are the first 32 lines:

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="GPS-Track-Analyse.NET 6.0.0.4" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" xmlns:gpxx="http://www.gps-freeware.de/xmlschema/TrackPointExtension/v1">

<metadata>

<link href="http://www.gps-freeware.de">

<text>Download GPS-Track-Analyse</text>

</link>

<time>2019-12-20T10:07:05Z</time>

<bounds maxlat="51.063084" maxlon="14.235392" minlat="50.875684" minlon="13.749549" />

</metadata>

<trk>

<name>2019-12-20 12:30:55</name>

<trkseg>

<trkpt lat="50.875708" lon="14.234807">

<ele>132.000000</ele>

<time>2019-12-20T12:30:57.000Z</time>

<pdop>6.00</pdop>

<extensions>

<gpxx:TrackPointExtension>

<gpxx:course>271.21048</gpxx:course>

<gpxx:hr>102</gpxx:hr>

<gpxx:atemp>14.2</gpxx:atemp>

</gpxx:TrackPointExtension>

</extensions>

</trkpt>

<trkpt lat="50.875708" lon="14.234807">

<ele>132.020000</ele>

<time>2019-12-20T12:30:58.000Z</time>

<pdop>6.00</pdop>

<extensions>

<gpxx:TrackPointExtension>

<gpxx:course>271.21048</gpxx:course>

<gpxx:hr>102</gpxx:hr>

<gpxx:atemp>14.2</gpxx:atemp>

</gpxx:TrackPointExtension>

</extensions>

</trkpt>

icon

Best answer by danilo_fme 6 January 2020, 20:09

View original

8 replies

Userlevel 4
Badge +30

Hi @plueschpuschel

Could you share us your source file?

 

Thanks,

Danilo

Badge

Hi @danilo_fme Yes, sure ... but I must zip the file, because of the website restriction > biketour.zip

Userlevel 4
Badge +30

Hi @danilo_fme Yes, sure ... but I must zip the file, because of the website restriction > biketour.zip

Thanks your Source.

I inserted your source gpx and expose the attribute extensions{0} in the Feature Type TrackPoint:

 

For extract the informations gpxx:atemp and gpxx:hr I used the transformer XMLFlattener and the result:

Attached the Workspace Template ( .FMWT ).

 

Thanks in Advance,Workspace_GPX.fmwt

Danilo

Badge

Wow.... thats works :) thank you. Now I just have to figure out, how to do it by myself...but your fmwt works !

Userlevel 4
Badge +30

Wow.... thats works :) thank you. Now I just have to figure out, how to do it by myself...but your fmwt works !

Excellent @plueschpuschel

I'm happy to help you!

 

Thanks,

Danilo

Badge

Hi.

I have another question: I have now tried many times to set the two XML flatteners accordingly, but I simply do not get the same result as with the "fmwt" file you uploaded. Furthermore, it would be great if I could also export the other values (time, date, x and y coordinates, speed, course, ...) into the shp file. As I am new to FME, as I said, it would be very nice if you could describe the process of creating the FME Workbench to me in more detail !? Especially the part of the settings of the two xml flatteners.

 

 

Thank you very much

 

and best regardsImmo
Userlevel 4
Badge +30

Hi.

I have another question: I have now tried many times to set the two XML flatteners accordingly, but I simply do not get the same result as with the "fmwt" file you uploaded. Furthermore, it would be great if I could also export the other values (time, date, x and y coordinates, speed, course, ...) into the shp file. As I am new to FME, as I said, it would be very nice if you could describe the process of creating the FME Workbench to me in more detail !? Especially the part of the settings of the two xml flatteners.

 

 

Thank you very much

 

and best regardsImmo

Hi @plueschpuschel

Offcourse. I can to help you - no problem.

In your Reader - did you expose the elements like this image:

Thanks,

Danilo

Badge

Hi @plueschpuschel

Offcourse. I can to help you - no problem.

In your Reader - did you expose the elements like this image:

Thanks,

Danilo

Hi ! Sorry, yesterday my internet was disabled ^^

 

I will describe what my workflow is like:

 

1. Start FME Workbench from ArcGIS Pro

2. Add Reader (gpx, coordinatesystem WGS 1984, individual feature types)

3. Add all feature types

4. unfold "Track Point" and rightclick on "Expose Elements" on "extensions{}"

and then ?

Reply