Skip to main content
Solved

GPX Reader and SHP Writer with GPXX extensions


plueschpuschel
Forum|alt.badge.img

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>

Best answer by danilo_fme

Hi @plueschpuschel

Could you share us your source file?

 

Thanks,

Danilo

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

8 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • Best Answer
  • January 6, 2020

Hi @plueschpuschel

Could you share us your source file?

 

Thanks,

Danilo


plueschpuschel
Forum|alt.badge.img

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


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 6, 2020
plueschpuschel wrote:

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


plueschpuschel
Forum|alt.badge.img

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


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 6, 2020
plueschpuschel wrote:

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


plueschpuschel
Forum|alt.badge.img

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

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 13, 2020
plueschpuschel wrote:

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


plueschpuschel
Forum|alt.badge.img
danilo_fme wrote:

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


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