openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.17k stars 911 forks source link

note gpx format of a limited use #457

Open richlv opened 11 years ago

richlv commented 11 years ago

notes can be exported to gpx, but the currently used format is of little use - assuming that the primary usecase is for users to upload these to their gps devices and survey the situation.

the problem is in the description tag. an example :

  <desc>
    <![CDATA[<div>
  <div class="note-comment" style="margin-top: 5px">
  <div class="note-comment-description" style="font-size: smaller; color: #999999">Created <span title=" 7 August 2013 at 16:37">13 days</span> ago by <a href="http://api.openstreetmap.org/user/extropy">extropy</a></div>
  <div class="note-comment-text">tram stop no more</div>
</div>

</div>
]]>
  </desc>

notice how it includes css and other quite useless information for a gpx file.

suggestion : strip it all, only leave in comment, author and timestamp.

for example : $comment (by $author at $date, $days ago)

reasoning - gps units have limited amount of space for waypoint descriptions, thus we leave the comment as the first entry (the most important), followed by other information

tomhughes commented 11 years ago

Well the basic problem is that we have a lot of information about a note, and it's not clear that there is any reasonable way to present it without some kind of structure or formatting information.

I have absolutely no idea what the target audience for the GPX format is supposed to be - as far as I know we inherited it from the original OpenStreetBugs implementation though @apmon may know more.

Currently what is put there is shared between a number of output formats, and using some other formatting would require duplication of that, which would be unfortunate from a maintenance point of view.

richlv commented 11 years ago

i see. but right now the gpx output seems to be useless. why not make it "sort of work" for now and once it is getting more use, i'd expect further improvements will be more obvious :)

richlv commented 11 years ago

well, something obvious i missed - notes can have comments, they should be included, too :) this could easily run out of the space limit for gps devices, but getting rid of the formatting is required anyway

SomeoneElseOSM commented 10 years ago

A little more info on what might be the issue here - Garmin GPSs (which are probably the majority dedicated GPS units that use OSM data) are fairly limited in terms of what they consided a "valid GPX" (at least my antique one does). It takes a bit of fiddling about to get something that fits nicely in the comment field. When I tried the "default" notes GPX extract it does load, but almost none of the information is visible on it. I ended up writing https://github.com/SomeoneElseOSM/Notes01 to do the job (still far from complete, but it does have a go at creating a usable "comment" from the note text).