Ticket #3617 (closed enhancement: fixed)

Opened 11 months ago

Last modified 5 weeks ago

Would like to see waypoint descriptions in JOSM

Reported by: burkhardm Owned by: reini122
Priority: normal Component: Core
Version: tested Keywords:
Cc: burkhard.meier@…, reinhard.handler@…

Description

Dear JOSM developers,

before I start mapping something in JOSM, I import .gpx tracks from my Garmin GPS using GPS Babel. Then I load the .gpx file into JOSM. It nicely displays both the track and the waypoints. However the waypoint descriptions that I entered into the device during my mapping tour are not visible. While working in JOSM, I usually have the .gpx file open in my text editor to view the descriptions, i.e. the <cmt> / <desc> elements (content seems to be identical), like in this example:

<wpt lat="48.001691625" lon="10.355957877">

<ele>618.729492</ele> <name>441</name> <cmt>26-SEP-09 16:03:25Abtwiler Str</cmt> <desc>26-SEP-09 16:03:25Abtwiler Str</desc> <sym>Flag, Blue</sym>

</wpt>

I'd like to see these descriptions in JOSM so that I wouldn't need to work with my text editor in parallel anymore.

I'm currently using version 1981.

Best Regards,

Burkhard

Attachments

WaypointConfigurableText.patch Download (2.6 KB) - added by reini122 6 weeks ago.
WaypointConfigurableTextPreferences.patch Download (12.1 KB) - added by reini122 5 weeks ago.

Change History

  Changed 11 months ago by burkhardm

  • type changed from defect to enhancement

  Changed 11 months ago by burkhardm

  • cc burkhard.meier@… added

  Changed 6 weeks ago by reini122

  • cc reinhard.handler@… added
  • owner changed from team to reini122
  • status changed from new to assigned

Hello! I'm new to JOSM but I am a programmer and i implemented the feature you wanted because i would like to have it too.

I added an property to set what is displayed. Possible values for property "draw.gpx.layer.wpt" are: * nameordesc: default and it represents the current behaviour. It displays name or if there is no name desc. * name: displays only the name attribute * desc: displays only the desc attribute * both: display the name and the desc attribute (desc in parenthesis) * none: displays no name for the waypoint

If you would like to get a test-version please contact me.

I'll add the diff to this ticket.

Changed 6 weeks ago by reini122

  Changed 6 weeks ago by bastiK

  • status changed from assigned to closed
  • resolution set to fixed

(In [3386]) applied #3617 (patch by reini122) - display waypoint descriptions in JOSM

  Changed 6 weeks ago by burkhard.meier@…

  • status changed from closed to reopened
  • resolution fixed deleted

Thank you for the change!

I have just tested it and it works fine. Personally I will be OK with setting a property for this. The problem may be that the property is (as it seems) not documented in the JOSM GUI and will be unknown for most people. It would be nice if it could be configured in JOSM's display properties dialog, in the tab for GPS track properties.

Therefore I'm reopening the ticket in the hope that someone will also make the new feature configurable in the Preferences dialog (in another way than adding the property)

One more thing I'm wondering: there are some properties named draw.rawgps.*. Shouldn't the new property be added to this category instead of draw.gpx (which I don't see in the list on JOSM at least)?

  Changed 6 weeks ago by anonymous

I confirm to you. I've already looked where i can document this feature but I didn't find something. I'll look if I can add this property to the GUI. Then I will rename it to draw.rawgps - the "old" name of the property is not very elaborate.

  Changed 6 weeks ago by bastiK

Wouldn't it be more useful to improve the default behaviour? E.g. change mode 'nameordesc' to 'auto' where it shows both name and description unless one is a substring of the other.

  Changed 6 weeks ago by bastiK

PS: Might be good to check if name or desc is the same for all waypoints and then don't show it.

follow-up: ↓ 11   Changed 6 weeks ago by burkhard.meier@…

I would be fine with changing the default behaviour too, if there is a good one that covers most cases.

The "one is a substring of the other" condition could cause problems, e.g.: name="10" description="2010/07/30 10:39 blabla" - 10 is a substring of 2010 (on my garmin device the description contains the timestamp by default)

  Changed 6 weeks ago by reini122

I agree with bastiK, only check if name or desc is the same and then only show one of them in mode auto/nameordesc.

in reply to: ↑ 9   Changed 6 weeks ago by bastiK

Replying to burkhard.meier@…:

I would be fine with changing the default behaviour too, if there is a good one that covers most cases. The "one is a substring of the other" condition could cause problems, e.g.: name="10" description="2010/07/30 10:39 blabla" - 10 is a substring of 2010 (on my garmin device the description contains the timestamp by default)

Good point, check for equality should be enough then.

  Changed 6 weeks ago by reini122

Hey Guys! I've done some changes: * Added the option to change the property in the preferences-dialog * Implemented the "Auto"-Feature and removed the "nameordesc"-Feature * Changed the property name to "draw.rawgps.layer.wpt"

  Changed 6 weeks ago by bastiK

Either it should update the painting without restart or it should give a warning that restart is required (-> return value for ok() method). Most settings on this page work without restart, so the first option is preferred.

Also, it would be better to apply the whitespace coding standard that is used in JOSM, e.g. no tabs, no space after opening parenthesis and put opening brace at the end of the previous line.

  Changed 5 weeks ago by reini122

  • status changed from reopened to new

Ok, thank you for the feedback.

I've realized the rapainting freature - so if the option in the preferences is changed, you'll see the change instantly after closing the dialog.

The patch is based on the checked in version - so the other patch (WaypointConfigurableTextPreferences.patch) should be ignored/deleted.

Changed 5 weeks ago by reini122

follow-up: ↓ 17   Changed 5 weeks ago by reini122

I replaced the old patch - so please use only the new one.

PS: Thank you for the info with the blanks/tabs - i replaced all my tabs with blanks and changed the settings in my IDE. I hope my code style is OK now.

  Changed 5 weeks ago by bastiK

  • status changed from new to closed
  • resolution set to fixed

(In [3396]) applied #3617 (patch by reini122) - Would like to see waypoint descriptions in JOSM

in reply to: ↑ 15   Changed 5 weeks ago by bastiK

Replying to reini122:

PS: Thank you for the info with the blanks/tabs - i replaced all my tabs with blanks and changed the settings in my IDE. I hope my code style is OK now.

It's not that important, but it is a little cumbersome to go through each line and fix the formatting. :)

  Changed 5 weeks ago by reini122

Hey bastiK! I think you forgot to commit the if-statement DrawingPreference.java.

  Changed 5 weeks ago by bastiK

I haven't investigated, but apparently it gets a repaint somewhere else. Otherwise, all the other options on that page would not update.

If tests show, that it is necessary, i can add it back.

Add/Change #3617 (Would like to see waypoint descriptions in JOSM)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.