Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix squashed maps #21

Merged
merged 1 commit into from
Sep 4, 2022
Merged

Fix squashed maps #21

merged 1 commit into from
Sep 4, 2022

Conversation

hugovk
Copy link
Collaborator

@hugovk hugovk commented Sep 4, 2022

This is similar to marcusvolz/strava#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
Copy link
Owner

Great, ty

@marcusvolz marcusvolz merged commit 159e30d into marcusvolz:main Sep 4, 2022
@hugovk hugovk deleted the unsquash-map branch September 4, 2022 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants