marcusvolz / strava_py

Create artistic visualisations with your exercise data (Python version)
MIT License
163 stars 19 forks source link

Fix squashed maps #21

Closed hugovk closed 2 years ago

hugovk commented 2 years ago

This is similar to https://github.com/marcusvolz/strava/issues/5.

Here's the same GPX using main:

strava-map

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:

strava-map

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.

marcusvolz commented 2 years ago

Great, ty