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

Cumulative view of user tracks #240

Closed
gluap opened this issue Apr 30, 2022 · 3 comments · Fixed by #260
Closed

Cumulative view of user tracks #240

gluap opened this issue Apr 30, 2022 · 3 comments · Fixed by #260
Assignees
Labels
enhancement New feature or request

Comments

@gluap
Copy link
Contributor

gluap commented Apr 30, 2022

This issue is one of the feature requests from this post:

Klaus writes: Es gibt im Portal einen Knopf mit dem ich mir „meine“ Tracks anzeigen lassen kann. Ich fände auch einen Knopf mit denen ich mir „meine“ Messdaten auf der Karte anschauen könnte, hilfreich.

I spoke to him and the "nicest" rendering would of course be a map showing exclusively the events from the logged-in users own tracks.

I looked into the database and we have the data we would need for this filtering in the portal.

A possible side advantage would be comparing different drivers on the same roads - i.e. Klaus on his road bike vs me on my recumbent vs Anna on the cargo bike - But cooperation of the users would be required as this is obviously personal data, so only ones own data should be available.

@gluap gluap added the enhancement New feature or request label Apr 30, 2022
@opatut
Copy link
Member

opatut commented Apr 30, 2022

If we want to do this right, we implement some kind of filters into the tile generator, such that additional arguments are passed into the layer queries, and that we can filter e.g. by userId or time (see #241).

I believe for this, we'll have to override parts of MvtGenerator, I don't believe dynamic arguments to the MVT function will be a feature ever supported by upstream openmaptiles-tools.

This sounds like a doable, albeit challenging, extension to the current system.

A quick solution would be not to implement this in the tile generator and instead use GeoJSON through a different pipeline, but then we'll have to implement all layers and their properties as both a tile layer query and in the GeoJSON pipeline, which is a lot of excess effort and will not always be in sync. Also, large user data collections will have the old performance problems again when rendering. I think the first approach is more desirable in any way, if we manage to pull it off technically.

@opatut
Copy link
Member

opatut commented May 1, 2022

Hey, it was easier than I thought, overriding just one method and now we can add custom variables to our getmvt function :) I'll build this soon.

@opatut opatut self-assigned this May 1, 2022
@opatut
Copy link
Member

opatut commented May 1, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants