osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

Add Activity to recorded gpx and add filter by activity #17997

Closed ghost closed 1 month ago

ghost commented 1 year ago

🚀 Differentiate the recorded gpx according to the profile used

OsmAnd does not differentiate the recordings GPX tracks according to the profile used.

This feature will make it easier to import the data into another sports activity tracking software. For example it could include <osmand:track_type>profile_name</osmand:track_type> in the XML code of each created track.

sonora commented 1 year ago

An automatism like this may be problematic because you can change your profile during a recording, either explicitly to e.g. look at something in another map style, or intrinsically by starting a navigation. But you surely don't want this to affect your tecording or its output.

If you have a requirement to categorize your recordings, it may better be done explicitly by adding a keywaord in its description upon saving, in its name, or place it in a certain folder?

ghost commented 1 year ago

Ok, but if you don't change anything during record, It's boring to have another step before saving the track. Maybe, just a popup to specify the profile to register if something has been modified during recording ?

ghost commented 1 year ago

Maybe have a list of predetermined keywords before saving file :

"hiking-2023-07-22-125489.gpx" "cycling-2023-07-22-125489.gpx" "running-2023-07-22-125489.gpx"

...and just click on one of them

XandrexOSM commented 1 year ago

the predetermined keywords is a brilliant idea. This keyword selector could be used for other places too, like in the OSM Notes GUI.

dmpr0 commented 10 months ago

ToDo

Track context menu

Screenshot

Top part

Info card

Activity item

None Selected

Activity selection screen

Screenshot

Separate screen that allows to select activity for track or track segment.

Search

Screenshot

Filters

Trip recording plugin

Option should allow pre-selection of activity type for profile. The selected activity should be automatically applied for all recorded tracks in the profile.

Selection mode

Activity id

vshcherb commented 10 months ago

Pull request related https://github.com/osmandapp/OsmAnd/pull/18765

sonora commented 10 months ago

This maybe be a useful option for some, but perhaps we can make it optional. And probably let's not couple activity with profile:

There are cases where the app profile used to record a track is actually meaningless,

vshcherb commented 10 months ago

Activity is not app profile, and we need to be able to change activity

dmpr0 commented 10 months ago

https://github.com/osmandapp/OsmAnd/issues/6174

nazar-kutz commented 2 months ago

@vshcherb We need to know what exactly OsmRouteTypes we should use to show on "Activity selection screen". In the current version of the code I'm currently working on, I use the full list of available OsmRouteTypes, but probably not all types from there should be interpreted as an activity type. Perhaps somewhere there is a complete list of types that can be taken as a basis?

We can deal with this later, but we must not forget about it.

vshcherb commented 2 months ago

@nazar-kutz we need to create another enum for activity, and that enum in OsmAnd-java project. I was referring to public static OsmRouteType convertFromOsmGPXTag(String tg) - as possible list of activities but it probably has nothing to do. Later on we could create a convert function RouteActivity -> OsmRouteType

nazar-kutz commented 2 months ago
  1. There is another problem related to UI. Should we have some state like "none" if no activity selected for the track? Currently on the "Track Menu dialog -> Info card" we display activity row only if it's present for the track, but if there is no any activity selected we don't display that row and so we can't choose activity.

My suggestion was to display the card and the row with the activity, but show that it is not selected, so we can click on this row to open the activity selection screen and select an activity. It seems to me like a good solution.

  1. The second question: should we create an ability to remove an activity for the track, for example by selecting "none" state on the "Select activity screen"?

  2. And the last question: we store an activity in the track's metadata "keywords" tag as a first keyword separated by comma from the others. On the UI we have another row "Keywords" where we display all keywords available in the track's metadata. Should we display activity in keywords too or we should filter it and display only other keywords if they're present?

vshcherb commented 2 months ago

@dmpr0 Yes, we should have Activity constantly displayed and allow to edit. With none activity, it should be an item "Activity not specified"

dmpr0 commented 2 months ago

Review

Screenshot
Screenshot ``` 1725890738833_2019-12-24_09-31_Tue_origin hill_climbing ```