osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.59k stars 1.01k forks source link

GPX import: Support icon selection by field sym in wpt #11285

Open skitourenguru opened 3 years ago

skitourenguru commented 3 years ago

🚀 feature request

Description

OsmAnd has great features to customize the appearance of waypoints. However it seems not to be possible to define an icon in the gpx file. In the specification of gpx the field sym is defined to display a specific icon.

Describe the solution you'd like

Map the most important sym strings to the collection of icons already built into OsmAnd.

Describe alternatives you've considered

No idea...

dremelts commented 2 years ago

@skitourenguru I'm not sure if this is exactly what you are looking for but I found that the icon can be specified in the extensions section of the gpx file thus:

  <wpt lat="41.873709" lon="-84.031098">
    <time>2022-04-21T23:38:50Z</time>
    <name>Walmart SC;#1836; Gas; (517) 265-9771</name>
    <desc>(517) 265-9771; 1601 E Hwy 223</desc>
    <extensions>
      <osmand:color>#ff9800</osmand:color>
      <osmand:icon>shop_supermarket</osmand:icon>
      <osmand:background>circle</osmand:background>
    </extensions>
  </wpt>
skitourenguru commented 2 years ago

I am open to any possibility to define the icon to be displayed. The osmand-extensions seems to be a valid solution. I will try it out. However I suppose other applications won't display it. The sym element on the other hand would be the standard of the GPX scheme to define the icom.

intrigeri commented 1 year ago

Hi, this is not going to help OsmAnd developers, but it might be useful to other users who need to feed OsmAnd with GPX files created by other apps.

I wrote a tool that converts waypoint icons from <sym> to the format supported by OsmAnd (osmand:icon, osmand:background, and osmand:color extensions), with user-provided mapping: https://salsa.debian.org/intrigeri/gpx-to-osmand/

Friptick commented 7 months ago

Any update on this, or explanation as to why it has been shelved?

This would be decent progress towards what I have been asking for (in various topics) for years: GPX interoperability. Some of us want to use OsmAnd to properly display the GPX waypoints which were generated by other software. OsmAnd continues to make this frustratingly hard.

My last issue had its title rewritten to replace the word "interoperability" with "import-export" and was later closed as "completed". But I never asked for that. As I explained, import-export functions are a poor second-best to file interoperability, for instance:

The GPX spec agrees:

Element: sym Text of GPS symbol name. For interchange with other programs, use the exact spelling of the symbol as displayed on the GPS. If the GPS abbreviates words, spell them out.

The clear implication here is that to allow "interchange" (interoperability), OsmAnd should be able to properly display a <wpt> created by other software.

Thoughts?

0709wiwiwi commented 7 months ago

https://forums.geocaching.com/GC/index.php?/topic/144374-list-of-gpsr-waypoint-icons-and-numbers/#elControls_2476729_menu

yuriiurshuliak commented 7 months ago

We are currently using GPX 1.1 and we support basic tags. Unfortunately, we are unable to support all custom tags.

However, we regularly work on improvements based on user feedback, such as this task: https://github.com/osmandapp/OsmAnd/issues/18342

Friptick commented 7 months ago

Thanks @yuriiurshuliak for that. FYI:

Fair enough. But the end result is that <sym> and <type> are useless because no app wants to implement them properly. It's a real shame. Since OsmAnd is the flagship FOSS mapping app for Android, I think you should consider taking the lead here.

One obvious proposal for <sym> would simply be to allow Unicode characters (or their official English names:

Both <sym> and <type> are in GPX 1.1 spec. It would be great if OsmAnd could make them useful at last.

0709wiwiwi commented 7 months ago

@Friptick The gpx 1.1 standard dates from Y 2004 and has not been changed since then. Even if your favo app supports 1000 icons or more, just the one you want is missing.

Friptick commented 7 months ago

@0709wiwiwi OK. Interesting information.

Even if your favo app supports 1000 icons or more, just the one you want is missing.

OK but do you not think that supporting 100 or even 20 would be progress compared to none? At the moment <sym> and <type> are just deadweight. Surely this is not what the GPX popes were imagining.

Your thoughts about my Unicode idea? Seems to good to be true. But UTF-8 is finally everywhere so it might be a magic bullet.

0709wiwiwi commented 7 months ago

@Friptick None ? I only follow some treads here but don't use OsmAnd. So what you expect is similar what Locus map offers. Locus by the sym supports 266 Garmin and 98 Locus icons. Also the android gpx viewer app offers a +/- similar simple sym icons support.

Friptick commented 1 month ago

There is a more serious problem here. When saving GPX tracks, OsmAnd wipes<sym> elements created by other software.

That counts as a straightforward bug:<sym> is a core element in the GPX spec. OsmAnd can choose to ignore this markup but it should not be deleting it.