How to display data from GPX file

35 views
Skip to first unread message

Alexander Täschner

unread,
Apr 1, 2019, 5:01:23 AM4/1/19
to MapSurfer.NET
I am not successful in figuring out, how to display data from a GPX file. The attached example file is downloaded from (http://www.gpsvisualizer.com/examples/google_gpx.html). Here are the unsuccessful steps I tried to display it in MapSurfer.Net Studio:

1.) In a new Project I added a new Styled layer inside the Project Explorer. I used the "GPX" datasource provider.
2.) In the properties of the styled layer I added a new FeatureTypeStyle to the Styles collection property.
3.) In the properties of the FeatureTypeStyle I added a new Rule to the Rules collection property.
4.) In the properties of the Rule I added a new PointSymbolizer to the Symbolizers collection property.
5.) In the properties of the PointSymbolizer I added a new MarkGraphicSymbol to the Graphic.GraphicSymbol collection property, with the WellKnownName property set to 'Star' and the Size set to 10,10.

The Events Log window shows no errors, but nothing is displayed.
barrett_spur.gpx

Runge

unread,
Apr 5, 2019, 2:16:28 PM4/5/19
to MapSurfer.NET
Hello Alexander,

Sorry for my late reply.
I did everything right. I've checked the file your provided and found two bugs in the source code. One is in GPXDataSourceProvider, another is in the rendering of 'Star' symbol.
To resolve the issue, I can suggest two options.
Option 1:
   1. Use OGR provider instead of GPX.
   2. Use any other marker except 'Star, for example 'Circle'.

However OGR also have a bug which does not allow to visualize all 4 way points in your file. It outputs only 3 of them.

Option 2:
I have fixed the bugs and prepared a new build, which is available here.

Please find attached a MapSurfer.NET project that shows data from your GPX file.


Kind regards,
Max


msn_gpx.zip

Alexander Täschner

unread,
Apr 5, 2019, 4:08:31 PM4/5/19
to MapSurfer.NET
Hello Max,

thank you very much for the help. Using the OGR provider I was able to both show tracks as lines and track points as points in my actual private gpx file.

Kind regards,
Alexander
Reply all
Reply to author
Forward
0 new messages