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
[Draft] [gpx] Add gpx import #5166
Conversation
For Manifest check this https://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i Tested with track |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your efforts, it's a good start! Let's focus on properly testing and supporting different GPX files/versions and 1.1 spec, and clean the code a bit.
This file was not imported on iOS |
This repo has many samples. Please check if there's something not supported yet: https://github.com/gps-touring/sample-gpx |
Need to have a look can we implement color support mapped to our current KML |
Checked this one, it is not a recorded track, but a planned route rteType that is not supported for now. I'll check how to support it, added here: https://github.com/cyber-toad/organicmaps/wiki/GPX#todo-for-initial-release |
|
I added support and test in today's commit and I was able to load "Falls of Glomach" route that you mentioned
I decided just to move this wiki page to comment in #624 issue so it is all together there |
If you see that any other related code can be improved by using string_view instead of string, don't stop and fix it :) |
1494015
to
2a169ee
Compare
I tried couple of suggestions for manifest, but on my Android device I still need to select application for file. Did you test with Android? Was OrganicMaps mapped to .gpx extension in your case? |
I store gpx file in root directory, in download directory, i can't open gpx file |
Are KML files opened correctly from the same directory? |
Yes i can open kml file from download directory or root directory |
Please also check that files with non-ascii symbols and spaces in their names are correctly opened on iOS and Android. |
I checked non-ascii and spaces for Android and it is fine, need someone with Apple to help with check for iOS. |
Just to summarize remaining items because I was not able to have any progress on them
Looks like all other boxes are completed. |
(1) is a blocker and should be fixed. However, it looks working on my devices, how did you test it? From which apps did you try to open gpx? On which Android version? Did it fail to suggest Organic Maps open that file type? Does it fail if the app wasn't launched and work if the app was launched at least once? Please also add GPX mime type scan to getBookmarksFilenameFromUri. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! We're almost there :)
This code was written by @rtsisyk , maybe he can give details about testing? I assume it's for cases when the full file name with extension can't be retrieved for some reason, but there is a correct mime type for the file. @rtsisyk do you remember when it is possible and how to test it? In the worst case, it is a no-op, if a file extension is always available from the system. |
571c8f5
to
1ffcfc0
Compare
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
Ready to merge and release? Are there any issues left to be fixed? |
I tested on my Android with cold start and it worked. There are 3 items that I have difficulties with resolve, for 2 of them I added my comments, for one of them about missing m_org I can't find an answer for now. Additionally 2 comments are displayed as "Outdated", so I can't view them here: https://github.com/organicmaps/organicmaps/pull/5166/files but I think I haven't done anything for them. My other action items are resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an exception test in a follow-up pull request. We'll prepare these changes for the release.
And thank you very much for your time and efforts to finish this important task! Do you want us to mention your GitHub nickname (or real name) in our news? @cyber-toad @dvdmrtnz |
Let's create an issue for GPX export. It would be great to finish it too. |
Done :) |
@biodranik Thanks a lot for your patience and help with this PR, I haven't use C++ for many-many years, so it was not easy for me to work with modern standard. If you want to put any details in news, feel free to use my GitHub handle.I'll try to work on remaining items once I have some free time. |
I think @cyber-toad deserves all the credit here! But if you want to mention me too there's no problem! @cyber-toad Great job! |
Great to hear this feature has been implemented! When will he new app hit the iOS App store? I would love to try it out. |
@cyber-toad how is time data from gpx stored in kml now after the import? |
We don't parse datetime data (if you are talking about |
@cyber-toad It will be needed to implement track recording, ideally together with any other custom data. Also, it is useful to display the imported or recorded track statistics. |
Hi,
I try to finish the work started by @dvdmrtnz in #4067.
I made some tests and updated Manifest file but still was not able to have .gpx file associated with OrganicMaps. I asked on stackoverflow and searched on web, but was not able to find an answer.
@rtsisyk @arnaudvergnet - as Android experts could you give me any advice on it?
@biodranik - could you please advice, what minimal set of items is required to be implemented for merge? I checked your comment here #4067 so I think it should be enough to fix codestyle issues that you mentioned and add more tests (what do we want to check - large files, some details of GPX spec, something else)?
Closes #4067
Fixes #2953
Fixes #2681
Fixes #624