Modify

Opened 3 weeks ago

Last modified 17 hours ago

#17551 reopened defect

Download along track doesn't completely download areas along the track

Reported by: GerdP Owned by: team
Priority: normal Milestone: 19.04
Component: Core Version:
Keywords: template_report, download_along Cc:

Description (last modified by GerdP)

What steps will reproduce the problem?

  1. Load attached gpx file
  2. Right click on layer and select "Download from OSM along this track"
  3. Select 20m, 5 km² and track only in the popup
  4. Click Download -> 9 should require individual download request
  5. Click OK

What is the expected result?

The downloaded areas should completely cover the track

What happens instead?

Sometimes you see gaps, e.g. jump to


to see

Please provide any additional information below. Attach a screenshot if possible.

When I convert the gpx track to "data layer" and use "Download along way" from the download_along plugin the result looks correct.

Build-Date:2019-04-02 08:23:01
Revision:14953
Is-Local-Build:true

Identification: JOSM/1.5 (14953 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 529 MB / 1753 MB (392 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:55839, -Dfile.encoding=UTF-8]
Program arguments: [--debug]

Plugins:
+ FastDraw (34949)
+ OpeningHoursEditor (34867)
+ apache-commons (34506)
+ buildings_tools (34904)
+ continuosDownload (82)
+ download_along (34869)
+ ejml (34389)
+ geotools (34513)
+ jaxb (34678)
+ jts (34524)
+ o5m (34867)
+ opendata (34911)
+ pbf (34867)
+ poly (34867)
+ reltoolbox (34867)
+ reverter (34958)
+ undelete (34919)
+ utilsplugin2 (34932)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (5)

jumpto.PNG (11.3 KB) - added by GerdP 3 weeks ago.
gap.PNG (187.1 KB) - added by GerdP 3 weeks ago.
17551.patch (6.2 KB) - added by GerdP 3 weeks ago.
Patch which duplicates code from DownloadAlongWayAction
sample.gpx (34.3 KB) - added by GerdP 3 weeks ago.
17551-v2.patch (23.6 KB) - added by GerdP 3 weeks ago.

Download all attachments as: .zip

Change History (34)

Changed 3 weeks ago by GerdP

Attachment: jumpto.PNG added

Changed 3 weeks ago by GerdP

Attachment: gap.PNG added

comment:1 Changed 3 weeks ago by GerdP

Description: modified (diff)

comment:2 Changed 3 weeks ago by GerdP

Cc: Don-vip added
Keywords: utilsplugin2 added

Although DownloadAlongTrackAction and DownloadAlongWayAction should do more or less the same the sources are very different.
The code in DownloadAlongWayAction provides the better solution using the private methods calcBetween()and calcScale().
I think it would be best to move all the code that calculates the areas into the base class DownloadAlongAction.

comment:3 Changed 3 weeks ago by GerdP

Description: modified (diff)

Changed 3 weeks ago by GerdP

Attachment: 17551.patch added

Patch which duplicates code from DownloadAlongWayAction

comment:4 Changed 3 weeks ago by GerdP

I'd prefer to merge the plugin into core. It seems that DownloadAlongTrackAction was derived from this plugin, so I wonder why the plugin still exists.

comment:5 Changed 3 weeks ago by Don-vip

No objection to bring all "download along" features into core. Plugin still exists because nobody ever found time to do the merge work.

comment:6 Changed 3 weeks ago by GerdP

OK, I'll work on it. Not sure if this was done in the past, is there an example how to manage the change?

comment:7 Changed 3 weeks ago by Don-vip

See r14924 / [o34937]:

  • add a new line new DeprecatedPlugin("fooPlugin", inCore) in DEPRECATED_PLUGINS
  • delete fooPlugin.jar in OSM SVN dist folder
  • svn mv plugins/fooPlugin oldplugins/fooPlugin to remove source but keep history

comment:8 Changed 3 weeks ago by Don-vip

(for SVN plugins). If this is a Github plugin, remove the entry from PluginsSource.

Changed 3 weeks ago by GerdP

Attachment: sample.gpx added

comment:9 Changed 3 weeks ago by GerdP

Keywords: download_along added; utilsplugin2 removed

comment:10 Changed 3 weeks ago by GerdP

In 14955/josm:

see #17551: preparation: copy icon for in-core DownloadAlongWayAction

Changed 3 weeks ago by GerdP

Attachment: 17551-v2.patch added

comment:11 Changed 3 weeks ago by GerdP

Please review v2. I've tried to move most of the common code to class DownloadAlongAction.
One small disadvantage: The menu entry for "Download along..." (ways) appears now in the "Tools" menu, with the plugin it is in the "More tools" menu.

My understanding is that the first step will be to commit this patch and later (after milestone 19.4 ?) do the svn move of the plugin sources.
If I hear no complains I'll commit v2 on Friday.

comment:12 in reply to:  11 Changed 3 weeks ago by Don-vip

Replying to GerdP:

The menu entry for "Download along..." (ways) appears now in the "Tools" menu

Why? Where is it right now?

comment:13 Changed 3 weeks ago by GerdP

With the plugin it appears in "More Tools". I don't know why.

comment:14 Changed 3 weeks ago by Klumbumbus

Usually the "Tools" menu is used by core features and the "More Tools" menu by plugins.

comment:15 Changed 3 weeks ago by GerdP

If this is a problem I can also change the code so that we keep the plugin.

comment:16 Changed 3 weeks ago by Klumbumbus

Which problem?
You plan to integrate the plugin in core and the statements "The menu entry for "Download along..." (ways) appears now in the "Tools" menu, with the plugin it is in the "More tools" menu." and "Usually the "Tools" menu is used by core features and the "More Tools" menu by plugins." fit together.

comment:17 Changed 3 weeks ago by GerdP

I mean that many users are used to find that command in the "More tools" menu. Just something we should mention on the next
"What's new" summary?

comment:18 in reply to:  17 Changed 3 weeks ago by Klumbumbus

Replying to GerdP:

I mean that many users are used to find that command in the "More tools" menu.

I think they will learn it ;)

Just something we should mention on the next
"What's new" summary?

We can add it to wiki:/Changelog and if there is no other new fancy stuff in 19.04 maybe also to the StartupPage.

comment:19 Changed 3 weeks ago by Klumbumbus

BTW: there is also this plugin: osmwiki:JOSM/Plugins/WayDownloaderPlugin it seems to have a similar functiunality. Do you plan to merge this one too?

comment:20 Changed 3 weeks ago by GerdP

I've never used it. I'll have a closer look...

comment:21 in reply to:  20 Changed 3 weeks ago by Klumbumbus

Replying to GerdP:

I've never used it.

Me neither.

comment:22 Changed 3 weeks ago by GerdP

I've just tried it. The idea is different and I think the common code is rather small.
It just downloads very small areas around the end nodes of a selected way to find further ways.

comment:23 Changed 3 weeks ago by GerdP

Resolution: fixed
Status: newclosed

In 14962/josm:

fix #17551: Download along track doesn't completely download areas along the track

  • merge plugin code from plugin download_along into core
  • use common code base for actions DownloadAlongTrackAction and DownloadAlongWayAction

comment:24 Changed 3 weeks ago by GerdP

@Java-Experts: SonarLint complains about the new code in DownloadAlongAction:
https://josm.openstreetmap.de/sonar/project/issues?id=josm&open=AWnshJGxtAo_7XrK18ba&resolved=false&sinceLeakPeriod=true&types=CODE_SMELL
Previously the code was in DownloadAlongTrackAction, not sure if it caused the same messages.

I agree that the code is not very transparent but it is not at all useless. It seems that the java compiler somehow optimizes the code so that SonarLint produces these false warnings. I've not found a good way to get rid of these messages.
Any hints what to do?

Last edited 3 weeks ago by GerdP (previous) (diff)

comment:25 Changed 2 weeks ago by Don-vip

Plugin archived in [o34964]. Should fix the Jenkins job that is broken since r14962.

comment:26 Changed 2 weeks ago by GerdP

Ah, sorry, did not think about that. Thanks for fixing it.

comment:27 Changed 2 weeks ago by GerdP

Now Jenkins Job Sonar-JOSM-Plugins failed

comment:28 Changed 9 days ago by Don-vip

Cc: Don-vip removed
Milestone: 19.04

comment:29 in reply to:  11 Changed 17 hours ago by Klumbumbus

Resolution: fixed
Status: closedreopened

Replying to GerdP:

The menu entry for "Download along..." (ways) appears now in the "Tools" menu, with the plugin it is in the "More tools" menu.

In fact it belongs in the "File" menu where all the other up- and download options are, I suggest between "download in current view" and "download object".

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to GerdP
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment


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

 
Note: See TracTickets for help on using tickets.