organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!

Home Page:https://organicmaps.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Native support of GPX bookmarks to import from OSMand and other apps

GLLM opened this issue · comments

commented

Hi all !

I'm very happy to see this new shiny fork of maps.me ....
I was using maps.me until I realize that the tracking was still in there. I then fully switched to OSMand...

OSMand is very powerful, but too complicated (too many settings & options) and UX/UI is not so 2021 ;-)
So I'd like to give OrganicMaps a try !

But for this I need to import my few hundreds favorites I currently have in OSMand, which sorted within different groups, each having its color, icon, comments ...
I've tried import the favorites.gpx, to no avail :-(

Could this be added ?

Thanks a lot, and looking forward to test and end-user contribute to OM !

GLLM

If osmand stores bookmarks in KML/KMZ, they can be imported by "Import" button in OM. Or you can export Osmand bookmarks in KML/KMZ, and then import them into OM.

Добрый день!

Хотел задать вопрос, но вижу, что он уже был. Плюсую к поддержке импорта GPX-файлов. Пока главное, чего мне не хватает, чтоб переехать в тестовом режиме.
Ребята, всем привет! Как можно импортировать избранное из других программ, вроде  Локуса или Османд через gpx файл?
Пробовал это делать, но эта программа не даёт выбрать 1 файл. Указываю пусть на сд-карте, а Органик, по видимому, ищет все gpx-файлы в корне флешки.
При тапе по файлу трека  GPX - предлагается открыть файл многими моими нави-прогами, но не программой OrganicMaps.
Хотелось бы и её видеть в списке для открытия GPX.

Is a gpx file import planned in the future?

commented

If osmand stores bookmarks in KML/KMZ, they can be imported by "Import" button in OM. Or you can export Osmand bookmarks in KML/KMZ, and then import them into OM.

I did, unfortunately, OSMand export a GPX with icon, color, lists & co, but when converted back into KML, all those details are lost and only the points are kept. Needless to say, I would have hundreds of coiiections to perform :-/

GLLM

Yeah this would be the killer feature for me.

I've noticed that OsmAnd exports bookmarks as .bin files (Settings -> Export -> Favorites)

Is there any other way I can export my bookmarks so that OrganicMaps can understand it?

If it's possible to export GPX, then it can be converted by some online tools into KML.

commented

Well, I'll try find a tool which does not loose all info.
TBH, i avoided the online tools, in favor of CLI ones.
I'll expand my search !

Well, I'll try find a tool which does not loose all info.
TBH, i avoided the online tools, in favor of CLI ones.
I'll expand my search !

This one works for me: https://activityworkshop.net/software/gpsprune/

commented

Well, I'll try find a tool which does not loose all info.
TBH, i avoided the online tools, in favor of CLI ones.
I'll expand my search !

This one works for me: https://activityworkshop.net/software/gpsprune/

Hey, thanks for the idea.
I checked it ... to no avail.

My 598 points coming from favorites in OSMand are all in the same group, without colors or any grouping + showing foreign characters for all my points in SE Asia.
This one wont work for me.

If I could find one program enabling me to load my GPX export and re manage my 598 points in a GUI by selecting regions and bulk assigning groups & color & icon, maybe that'll work for me

thanks anyway for trying to help

commented

Another day, another attempt.

I tried my luck today with umap from openstreemap.fr ... to no avail.

OSMand groups <> layer in OSM <> Bookmark list in OrganicMaps.
I cannot find a way to have my hundreds of points gathered in my dozens of groups :-(

I cannot bulk edit at any point between umap OSM and OrganicMaps.

I'm still stuck

I have checked OSMAnd. OSMAnd can share GPX file with bookmarks. Organic Maps should support .gpx import natively. GPX format is widespread and created by multiple other apps, not only OSMAnd.

This feature is good to go. We are looking for volunteers who can start working on it. Some basic C++ expertise is required. Starting point is https://github.com/organicmaps/organicmaps/blob/master/map/bookmark_manager.cpp#L1941

I have checked OSMAnd. OSMAnd can share GPX file with bookmarks. Organic Maps should support .gpx import natively. GPX format is widespread and created by multiple other apps, not only OSMAnd.

This feature is good to go. We are looking for volunteers who can start working on it. Some basic C++ expertise is required. Starting point is https://github.com/organicmaps/organicmaps/blob/master/map/bookmark_manager.cpp#L1941

THIS!
gpx is de facto the standard for everything gps-related, especially when it comes to open-source. Only google really supports kml.

That being said, feature-wise gpx is superior too. Not sure if this has changed recently but as far as I know, kml only supports waypoints and tracks (in the form of coordinates) and in parts also comments.
gpx on the other hand supports waypoints and tracks, comments and descriptions, timestamps and heights and gps satelite data.

So imo at the very least, support both.

If osmand stores bookmarks in KML/KMZ, they can be imported by "Import" button in OM. Or you can export Osmand bookmarks in KML/KMZ, and then import them into OM.

I did, unfortunately, OSMand export a GPX with icon, color, lists & co, but when converted back into KML, all those details are lost and only the points are kept. Needless to say, I would have hundreds of coiiections to perform :-/

GLLM

If you convert whit https://www.gpsvisualizer.com/map_input?add_elevation=auto&form=googleearth&trk_hue=240&trk_opacity=80&trk_width=3&units=metric&wpt_color=green everything stays like is was, just did my 400 routes and 300 waypoints

Is this of any help? I gladly donate the code.

https://github.com/PanderMusubi/osmand2mapswithme

As a user of both Organic Maps and OsmAnd, please also offer export to the format for OsmAnd.

Can't OSMand import KML/KMZ or GPX?

Let me rephrase that, does Organic Maps (will) have a file with its favourites that gets updated with each change to favourites? I can't find files in Android/data/app.organicmaps/files

OsmAnd has it at Android/data/net/osmand.plus/files/favourites.gpx

This is also for synchronization via Syncthing.

There is no way to allow users to access the internal app's files on Android 11 and above. That's Android limitation. If you have root access, you can find these files at /data/data/app.organicmaps/files

OsmAnd automatically writes a copy to that accessible place, plus after each change a backup as Android/data/net/osmand.plus/files/backups/favourites_xy.gpx.bz2 so you can always sync them automatically with another device.

Automatic backup/copy is possible, it is discussed in another issue #622, please leave your ideas there.

As I have GPX files for Garmin devices, would it be better to have a separate feature reaqust to support (at least a subset of) Garmin icons ( tag), if/when GPX import is available?
http://www.gpsbabel.org/htmldoc-development/GarminIcons.html

Do you propose to map Garmin icons to some OM icons? That can be done later, but you can suggest it here, with exact icons and mappings, to make the task clear.

I would also support GPZ format (zip-ped GPX) that can contain some icons internally, to allow users later to see any imported icon easily in OM.

The ability to share and use gpx waypoints would indeed be very nice. Implementing some of the standard Garmin icons such as documented here could also be a good complement. Thanks a lot to the developers for this excellent app!

GPX track colors like this one should be supported:

<trk>
    <name>new</name>
    <type>Cycling</type>
    <extensions>
        <gpx_style:line>
        <color>0433ff</color>
        </gpx_style:line>
    </extensions>
...
commented

What has to be considered regarding Import/Export of GPX data is that every APP creates their own Syntax (and Extensions) for things like Address, Phone No., Symbol, Color, etc, etc. OsmAnd is in the process - but not yet done - of extending the user Waypoint attributes to mimic the POI attributes in GPX.

So, for Organic Maps to implement GPX import that would support OsmAnd GPX Extended Attributes, they will need to incorporate OsmAnd's GPX Extention Schema into their Import code. Then OM will need to do the same for each GPX Schema that customers want to have GPX interoperability with. No a big deal but effort nonetheless.

Can someone please collect and document here all GPX extensions (with examples) that you think should be supported by OM?

commented

OsmAnd is in the process of creating the support (GPX Extensions) for passing OSM POI attributes to User Favorites/Waypoints. When OsmAnd publishes their Extensions I will post them here.

You might also consider support for [Garmin GPX Waypoint Extensions](http://www.garmin.com/xmlschemas/WaypointExtension/v1 http://www8.garmin.com/xmlschemas/WaypointExtensionv1.xsd).

commented

As discussed here, attached is a GPX file as produced by Tower Collector (I use these sometimes for "take me back" routing, currently in OsmAnd which I consider to replace by OM):
2022-07-16-11-56-47.gpx.zip

I'm curious: Is there an update regarding GPX export of navigation trails? The feature still does not seem to exist.

@randomsnowflake what is your use-case? Do you need to build a route in Organic Maps, and then export it? For what?

@randomsnowflake what is your use-case? Do you need to build a route in Organic Maps, and then export it? For what?

I need GPX for offline navigation using an Apple Watch or a Garmin Watch.

Garmin has native GPX support. For Apple Watch you need an external app (such as WorkOutDoors) to load the tracks.

Without this simple feature an offline map is almost useless for me, since navigating with the phone (vs. just looking at my wrist) is a real chore.

See (for example) GuruMaps for a nice implementation of this feature.

@randomsnowflake what is your use-case? Do you need to build a route in Organic Maps, and then export it? For what?

I need GPX for offline navigation using an Apple Watch or a Garmin Watch.

Garmin has native GPX support. For Apple Watch you need an external app (such as WorkOutDoors) to load the tracks.

Without this simple feature an offline map is almost useless for me, since navigating with the phone (vs. just looking at my wrist) is a real chore.

See (for example) GuruMaps for a nice implementation of this feature.

This is my use case too. I am currently using https://gpx.studio to generate GPX for my Polar Grit X watch, but this requires an internet connection and is not very much mobile friendly. I would love to benefit from the excellent routing engine from OrganicMaps (way better than the one from OSMAnd) on my mobile.

Some details for current active PR: #5166

Todo for initial release

  • Fix all code-review comments in #5166

Spec

Element: gpx +

Complex Type: gpxType +

Complex Type: metadataType

Complex Type: wptType +

Complex Type: rteType +

Complex Type: trkType +

Complex Type: extensionsType

Complex Type: trksegType +

Complex Type: copyrightType

Complex Type: linkType

Complex Type: emailType

Complex Type: personType

Complex Type: ptType

Complex Type: ptsegType

Complex Type: boundsType

Extensions

Garmin #624 (comment)
Garmin

Surface
<gpxtpx:Extensions>
<surface>asphalt</surface>
</gpxtpx:Extensions>

Speed
<gpxtpx:TrackPointExtension>
<gpxtpx:speed>2.21</gpxtpx:speed>

Track colors
<trk>
<name>new</name>
<type>Cycling</type>
<extensions>
<gpx_style:line>
<color>0433ff</color>
</gpx_style:line>
</extensions>

Timestamsp and elevation
See ele and time tags

Garmin icons

OSMAnd gpx extensions

Nice to have

GPX polygons

@cyber-toad it would be amazing if you could also support OSMAnd gpx extensions for interoperability. I don't know if we need everything but here's documentation so you could take a look.

@cyber-toad it would be amazing if you could also support OSMAnd gpx extensions for interoperability. I don't know if we need everything but here's documentation so you could take a look.

Thanks, @pm4rcin. Not sure when it is possible to implement it, but I added to list of extensions here #624 (comment) to not to forget about it.

commented

Very glad to see this, thank you so much :)
Will try it out as soon as the new version lands.

commented

Guys just a big thank for adding this feature. I went on a montain trail today and I used OM to get around with a GPX file imported from another hiker! Thank for adding GPX import ❤️
image
image

Well, I'll try find a tool which does not loose all info. TBH, i avoided the online tools, in favor of CLI ones. I'll expand my search !

There is a very simple Python Script that can do that!

This issue is very old. Organic maps looks gorgeous and is fast, but it has very few features. And I highly prefer GPX which is not binary, instead of this weird KML.

Also there is no option to export by downloading, just the share dialog. This is a very bad habit of Android apps, the reason why "Save to..." exists. So to make a backup locally you literally need another app just to save the file.