Modify

Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#3617 closed enhancement (fixed)

Would like to see waypoint descriptions in JOSM

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

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 (2)

WaypointConfigurableText.patch (2.6 KB ) - added by reini122 15 years ago.
WaypointConfigurableTextPreferences.patch (12.1 KB ) - added by reini122 15 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 by burkhardm, 16 years ago

Type: defectenhancement

comment:2 by burkhardm, 16 years ago

Cc: burkhard.meier@… added

comment:3 by reini122, 15 years ago

Cc: reini122 added
Owner: changed from team to reini122
Status: newassigned

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.

by reini122, 15 years ago

comment:4 by bastiK, 15 years ago

Resolution: fixed
Status: assignedclosed

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

comment:5 by burkhard.meier@…, 15 years ago

Resolution: fixed
Status: closedreopened

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)?

comment:6 by anonymous, 15 years ago

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.

comment:7 by bastiK, 15 years ago

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.

comment:8 by bastiK, 15 years ago

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

comment:9 by burkhard.meier@…, 15 years ago

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)

comment:10 by reini122, 15 years ago

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 comment:11 by bastiK, 15 years ago

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.

comment:12 by reini122, 15 years ago

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"

comment:13 by bastiK, 15 years ago

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.

comment:14 by reini122, 15 years ago

Status: reopenednew

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.

comment:15 by reini122, 15 years ago

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.

comment:16 by bastiK, 15 years ago

Resolution: fixed
Status: newclosed

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

in reply to:  15 comment:17 by bastiK, 15 years ago

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. :)

comment:18 by reini122, 15 years ago

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

comment:19 by bastiK, 15 years ago

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain reini122.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.