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

Configurable (or automatic) line width for heatmap #9

Closed
laufhannes opened this issue Feb 1, 2017 · 2 comments
Closed

Configurable (or automatic) line width for heatmap #9

laufhannes opened this issue Feb 1, 2017 · 2 comments

Comments

@laufhannes
Copy link
Contributor

laufhannes commented Feb 1, 2017

As already stated in #7, the heatmap is kind of useless if the track collection is wide spread. Still, I'm a big fan of having a look at my complete route net.

My current solution is to reduce line widths by hand, e.g.

for line in scaled_lines:
    d.add(d.polyline(points=line, stroke=color, stroke_opacity=0.02, fill='none', stroke_width=0.5, stroke_linejoin='round', stroke_linecap='round'))
for line in scaled_lines:
    d.add(d.polyline(points=line, stroke=color, stroke_opacity=0.05, fill='none', stroke_width=0.2, stroke_linejoin='round', stroke_linecap='round'))
for line in scaled_lines:
    d.add(d.polyline(points=line, stroke=color, fill='none', stroke_width=0.05, stroke_linejoin='round', stroke_linecap='round'))
for line in scaled_lines_special:
    d.add(d.polyline(points=line, stroke=color_special, fill='none', stroke_width=0.05, stroke_linejoin='round', stroke_linecap='round'))

That is: 0.02, 0.5 and 0.05, 0.2 instead of 0.1, 5.0 and 0.2, 2.0 (for ~2.600 activities from Sweden till the Alps). A high resolution image is required, but it works.

Maybe it's possible to automatically calculate line widths based on d_y and d_x. We could define limits for the values (e.g. both version from above as upper and lower limit respectively).

@lowtower
Copy link
Contributor

First attempt to address this issue with #94
Please test it.

Thanks,
LT.

@laufhannes
Copy link
Contributor Author

That looks great, thanks!

lowtower referenced this issue in lowtower/GpxTrackPoster Jan 14, 2022
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

No branches or pull requests

2 participants