davedavenport / gpx-viewer Goto Github PK
View Code? Open in Web Editor NEWGPX Viewer is a simple tool to visualize tracks and waypoints stored in a gpx file.
License: GNU General Public License v2.0
GPX Viewer is a simple tool to visualize tracks and waypoints stored in a gpx file.
License: GNU General Public License v2.0
Dependencies: * libchamplain-gtk (0.12) * libchamplain (0.12) * vala 0.9.* * gtk+-3.0 * gmodule 2.0 * libxml2 * libgdl 3.0 A simple gpx viewer with some editing capabilities. Patches with more features are welcome as long as they are maintained.
How is manager supposed to be used?
Should it be moved to it's own project?
https://github.com/DaveDavenport/gpx-viewer/tree/0.4.0/manager
Using FitSdk
https://developer.garmin.com/fit/download/
I was able to parse recent fit files
java -jar FitCsvTool.jar -b input.fit output.csv
bug gpx-viewer do not parse the file (do not find records and do not create track)
Will use this java impl to find what changed. Is the current implementation working with any fit file @DaveDavenport ? I ask to support different versions, or check if this sdk support both formats. I can upload one example of recent fit file
Trying to build on Artix GNU/Linux, an Arch Linux based distribution, rolling release, so all packages are usually quite up to date with latest upstream release.
build according to this build recipe:
meson --prefix /usr --buildtype=plain . builddir
ninja -C builddir
Build fails with :
gpx-viewer-path-layer.vala:259.3-259.31: error: overriding method `Gpx.Viewer.PathLayer.set_view' is incompatible with base method `void Champlain.Layer.set_view (Champlain.View?)': incompatible type of parameter 1.``:
The Meson build system
Version: 1.2.0
Source dir: /home/felics/.cache/yay/gpxviewer-git/src/gpxviewer-git
Build dir: /home/felics/.cache/yay/gpxviewer-git/src/gpxviewer-git/builddir
Build type: native build
Project name: gpx-viewer
Project version: 0.5.0
C compiler for the host machine: ccache cc (gcc 13.1.1 "cc (GCC) 13.1.1 20230714")
C linker for the host machine: cc ld.bfd 2.40.0
Vala compiler for the host machine: valac (valac 0.56.9)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.h using configuration
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency gmodule-2.0 found: YES 2.76.4
Run-time dependency gtk+-3.0 found: YES 3.24.38
Run-time dependency libxml-2.0 found: YES 2.11.4
Run-time dependency gdl-3.0 found: YES 3.40.0
Run-time dependency champlain-0.12 found: YES 0.12.21
Run-time dependency champlain-gtk-0.12 found: YES 0.12.21
Run-time dependency clutter-gtk-1.0 found: YES 1.8.4
Library m found: YES
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Build targets in project: 19
gpx-viewer 0.5.0
User defined options
buildtype: plain
prefix : /usr
Found ninja-1.11.1 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
ninja: Entering directory `builddir'
[15/33] Compiling Vala source ../libgpx/gpx-parser-fit.vala ../libgpx/gpx-con....vala ../libgpx/gpx-viewer-map-view.vala ../libgpx/gpx-viewer-path-layer.vala
FAILED: libgpx/libgpx.a.p/gpx-parser-fit.c libgpx/libgpx.a.p/gpx-convert.c libgpx/libgpx.a.p/gpx-file-base.c libgpx/libgpx.a.p/gpx-graph.c libgpx/libgpx.a.p/gpx-parser-xml.c libgpx/libgpx.a.p/gpx-parser-json.c libgpx/libgpx.a.p/gpx-point.c libgpx/libgpx.a.p/gpx-playback.c libgpx/libgpx.a.p/gpx-settings.c libgpx/libgpx.a.p/gpx-track.c libgpx/libgpx.a.p/gpx-track-treemodel.c libgpx/libgpx.a.p/gpx-viewer-map-view.c libgpx/libgpx.a.p/gpx-viewer-path-layer.c libgpx/gpx.h libgpx/gpx.vapi
valac -C --vapidir /home/[...]/.cache/yay/gpxviewer-git/src/gpxviewer-git/vapi --pkg config --use-header --disable-assert --pkg clutter-gtk-1.0 --pkg champlain-gtk-0.12 --pkg champlain-0.12 --pkg gdl-3.0 --pkg libxml-2.0 --pkg gtk+-3.0 --pkg gmodule-2.0 --color=always --directory libgpx/libgpx.a.p --basedir ../libgpx --library gpx --header libgpx/gpx.h --vapi ../gpx.vapi ../libgpx/gpx-parser-fit.vala ../libgpx/gpx-convert.vala ../libgpx/gpx-file-base.vala ../libgpx/gpx-graph.vala ../libgpx/gpx-parser-xml.vala ../libgpx/gpx-parser-json.vala ../libgpx/gpx-point.vala ../libgpx/gpx-playback.vala ../libgpx/gpx-settings.vala ../libgpx/gpx-track.vala ../libgpx/gpx-track-treemodel.vala ../libgpx/gpx-viewer-map-view.vala ../libgpx/gpx-viewer-path-layer.vala
Command-line option `--use-header` is deprecated and will be ignored
../libgpx/gpx-parser-xml.vala:86.13-86.23: warning: `null' incompatible with return type `Gpx.Point'
86 | return null;
| ^~~~~~~~~~~
../libgpx/gpx-graph.vala:354.10-354.19: warning: `Gtk.Menu.popup' has been deprecated since 3.22
354 | menu.popup (null, null, null, event.button, event.time);
| ^~~~~~~~~~
../libgpx/gpx-graph.vala:678.14-678.29: warning: `Gdk.cairo_create' has been deprecated since 3.22
678 | var ctx = Gdk.cairo_create(win.get_window());
| ^~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:111.3-111.33: warning: `Clutter.CairoTexture' has been deprecated since 1.12
111 | Clutter.CairoTexture path_actor;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:132.4-132.22: warning: `Clutter.Actor.paint' has been deprecated since 1.12
132 | content_group.paint ();
| ^~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:138.4-138.22: warning: `Clutter.Actor.paint' has been deprecated since 1.12
138 | content_group.paint ();
| ^~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:259.3-259.31: error: overriding method `Gpx.Viewer.PathLayer.set_view' is incompatible with base method `void Champlain.Layer.set_view (Champlain.View?)': incompatible type of parameter 1.
259 | public override void set_view (Champlain.View view)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:80.3-80.21: warning: Gpx.Viewer.PathLayer.visible hides inherited property `Clutter.Actor.visible'. Use the `new' keyword if hiding was intentional
80 | public bool visible {
| ^~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:208.13-208.29: warning: `Clutter.CairoTexture.create' has been deprecated since 1.8
208 | var cr = path_actor.create ();
| ^~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:176.5-176.26: warning: `Clutter.Actor.unparent' has been deprecated since 1.10
176 | content_group.unparent ();
| ^~~~~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:122.20-122.39: warning: `Clutter.Group.new' has been deprecated since 1.10
122 | content_group = new Clutter.Group ();
| ^~~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:123.4-123.27: warning: `Clutter.Actor.set_parent' has been deprecated since 1.10
123 | content_group.set_parent (this);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:124.21-124.40: warning: `Clutter.CairoTexture' has been deprecated since 1.12
124 | path_actor = new Clutter.CairoTexture (256, 256);
| ^~~~~~~~~~~~~~~~~~~~
../libgpx/gpx-viewer-path-layer.vala:125.4-125.26: warning: `Clutter.Container.add_actor' has been deprecated since 1.10
125 | content_group.add_actor (path_actor);
| ^~~~~~~~~~~~~~~~~~~~~~~
Compilation failed: 1 error(s), 13 warning(s)
ninja: build stopped: subcommand failed.
Note that there is also a warning
``Command-line option `--use-header` is deprecated and will be ignored``.
Tools information:
valac --version
: Vala 0.56.9
ninja --version
: 1.11.1
meson --version
: 1.2.0
gcc --version | head -n1
: gcc (GCC) 13.1.1 20230714
Hi,
I couldn't find an private email, so I am using this issue now to ask some questions:
I really like this project and would like to do some coding for it to bring it on par with Turtle Sport (for me). I know that you don't intend this app to be a fitness tracker, but I think it's not far from there I think and I am also happy to continue the effort under a different name if thats necessary, I just would love to have an "native" app for this!
For one, I'd like to change the graph view to react on mouse over and display the value that are below the mouse (but keep the select functionality). Also the dot on the map should follow the current mouse position. I'd also like the graph to show 4 curves at the same time, selectable:
Heart rate, altitude, speed and cadence (see this screenshot:
)
Now the reason I am asking is that I saw that you have an updated Graph class. Is there a point on continuing with that class? Or should I base my effort on the old one?
Cheers,
Wolf
Use case: I just run a triathlon and I loose my chip at very beggining. In the end, organization only register start and end time (classification)
I wear gps watch and cyclocomputer so I have exact tracks for all the run.
The thing is a triathlon tracks should not only cover swing, bycicle and run but transitions. In order to extract that data:
1- On start map looks really small.
2- Loading a track map gets greyed for some time
For 1 Gnome maps shows a continuous horizontal map (and probably guess the available height to determine the zoom
For 2, probably set the map on bounding box for track will help, showing gears until tiles are loaded, not really sure how to fix this. Is there a signal in champlain when an area is fully loaded?
gps is know to produce jumps from time to time, tracks going back and forth, movements up/down left right.
Filter those (by max speed, follow path or similar) will allow a better review of gpx tracks
Hi,
could you tag releases for 0.4 and later, please?
We have an outdated package on gentoo linux and this would help our maintainers to keep up to date. Thank you.
https://packages.gentoo.org/packages/sci-geosciences/gpx-viewer
Flathub request this to verify the app:
Create a page at https://sarine.nl/.well-known/org.flathub.VerifiedApps.txt containing the following token:
cbfec812-01eb-4894-a2c2-595152db6379
There's only active https://blog.sarine.nl, so probably we can modify that url to have the file at correct place
Example from gnome apps:
https://gnome.org/.well-known/org.flathub.VerifiedApps.txt
@DaveDavenport do you think we can add that? I will work to fix the url website
You can review here:
there's an open question about why session-bus permission is needed.
After #20 probably save edition would make sense.
There are lot of interesting comparisons between routes
Elevation
Hill grades
Distance
And even for tracks (more if they are for same route):
From #19, adding an array of tracks It can represent more than one track at time.
I have some data to show examples of gpx comparison.
Would be great if knots and nautical miles were supported too.
Any reason to keep gpx-viewer in C? Looks easily portable to vala
It could be a great idea to isolate gpx graph as a new library providing this component.
It would help with #3 and might allow other projects to easily plot data
Hi,
I am the author of phone app called Oribooklet that helps doing maps for a sport called Orienteering.
GPX Viewer fits very well to show what the mapper is doing in a graphic way, without I had to write a new code to show it.
My question is if your app accepts an intents to show a file, called from another application?
It is not possible to display gpx tracks without timing information.
gpx-viewer-Message: 19:39:24.974: gpx-parser-xml.vala:139: Failed to get point: trkpt
gpx-viewer-Message: 19:39:24.974: gpx-parser-xml.vala:139: Failed to get point: trkpt
gpx-viewer-Message: 19:39:24.974: gpx-parser-xml.vala:139: Failed to get point: trkpt
gpx-viewer-Message: 19:39:24.974: gpx-parser-xml.vala:139: Failed to get point: trkpt
gpx-viewer/libgpx/gpx-parser-xml.vala
Lines 85 to 87 in e92b573
diff --git a/libgpx/gpx-parser-xml.vala b/libgpx/gpx-parser-xml.vala
index 77134fd..584b99b 100644
--- a/libgpx/gpx-parser-xml.vala
+++ b/libgpx/gpx-parser-xml.vala
@@ -82,9 +82,7 @@ namespace Gpx
pointNode = pointNode->next;
}
- if(p.time != null) {
- return p;
- }
+ return p;
}
return null;
}
https://github.com/DaveDavenport/gpx-viewer/blob/master/src/gpx-viewer.c#L612
Some gpx contains incorrect time.
With an option on custom dialog, it can create a fake timestamps and graphs are available.
Some graphs like elevation or distance could exists without this condition.
a speed alghoritm depending on elevation percentage could create accurate timestamps for walk, run, bycicle, moto....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.