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

Marker: hold unique reference to TrackPoint. #1831

Closed
wants to merge 2 commits into from
Closed

Conversation

dennisguse
Copy link
Member

OpenTracks only allows to create Markers if a valid location is available (i.e., a TrackPoint with location was stored).
However, in the current implementation the TrackPoint and Marker tables are independent (i.e., Markers also store lat/lng, altitude etc) and they are just indirectly linked together by time.
In addition, Markers have the duration and length (here distance) for being rendered on the charts.

This PR changes this on database level by adding a reference for each Marker to one TrackPoint.

However: Both GPX and KML allow to import Markers that are not related to any TrackPoint within a Track.

This implies that people might have Markers that cannot be linked to a TrackPoint - they might not even be close to any TrackPoint (in time as well as location).
Even worse people might have imported such Tracks on purpose to show the Markers with OSMDashboard or just to store all their tracking data in OpenTracks (from other application).

Question: Should OpenTracks internal data model reflect how OpenTracks works or rather keep the existing functionality?

PS/ I am not even sure that the functionality was intended this way...

Required TrackPoint data is now loaded with a JOIN.

Part of #1725.
@dennisguse dennisguse marked this pull request as ready for review January 15, 2024 07:18
@dennisguse dennisguse marked this pull request as draft January 15, 2024 07:19
@dennisguse
Copy link
Member Author

@rgmf @pstorch do you have an opinion about this?

@hercek
Copy link
Contributor

hercek commented Jan 24, 2024

Well i do not personally care about markers but I would expect them to work like this:

  1. They are shown on OpenTrack charts only when they belong to a track point based on location or time. They must be close to the track point location within track point length (and maker size). Or their time (middle of their duration) must fall into track point time. One makers should belong to best fit track point if any.

  2. They should be shown always on maps and only based on their location. The mapping software can provide filtering based on maker time/duration. But this is not an OpenTracks issue.

@dennisguse
Copy link
Member Author

I thought about this and we leave it as it/was aka a Marker may be related to a TrackPoint, but we may have imported data and then this may just be not true.

@dennisguse dennisguse closed this Feb 7, 2024
@dennisguse dennisguse deleted the markerDB#1725 branch May 26, 2024 17:52
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.

None yet

2 participants