Like https://stackoverflow.com/a/14457180/724176, rather than using latitude and longitude values, this uses a Mercator projection calculation to come up with x and y values instead.
Dummy, unit map width and height values are used, as we don't know and don't need to know the final size as matplotlib will take care of that.
And with this PR:
Measuring performance:
With main, on 2,946 GPX files (but commenting out some bits of cli.py to only run "Processing data..." and "Plotting map..."), it takes 11m45s on a Mac M1 16GB.
With the PR it takes a comparable 11m43s, which is really good because the transform is done by Pandas so presumably in C.
This is similar to https://github.com/marcusvolz/strava/issues/5.
Here's the same GPX using
main
:Like https://stackoverflow.com/a/14457180/724176, rather than using latitude and longitude values, this uses a Mercator projection calculation to come up with x and y values instead.
Dummy, unit map width and height values are used, as we don't know and don't need to know the final size as matplotlib will take care of that.
And with this PR:
Measuring performance:
With
main
, on 2,946 GPX files (but commenting out some bits ofcli.py
to only run "Processing data..." and "Plotting map..."), it takes 11m45s on a Mac M1 16GB.With the PR it takes a comparable 11m43s, which is really good because the transform is done by Pandas so presumably in C.