Modify

Opened 6 years ago

Closed 6 years ago

#17551 closed defect (fixed)

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 6 years ago.
gap.PNG (187.1 KB ) - added by GerdP 6 years ago.
17551.patch (6.2 KB ) - added by GerdP 6 years ago.
Patch which duplicates code from DownloadAlongWayAction
sample.gpx (34.3 KB ) - added by GerdP 6 years ago.
17551-v2.patch (23.6 KB ) - added by GerdP 6 years ago.

Download all attachments as: .zip

Change History (35)

by GerdP, 6 years ago

Attachment: jumpto.PNG added

by GerdP, 6 years ago

Attachment: gap.PNG added

comment:1 by GerdP, 6 years ago

Description: modified (diff)

comment:2 by GerdP, 6 years ago

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 by GerdP, 6 years ago

Description: modified (diff)

by GerdP, 6 years ago

Attachment: 17551.patch added

Patch which duplicates code from DownloadAlongWayAction

comment:4 by GerdP, 6 years ago

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 by Don-vip, 6 years ago

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 by GerdP, 6 years ago

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 by Don-vip, 6 years ago

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 by Don-vip, 6 years ago

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

by GerdP, 6 years ago

Attachment: sample.gpx added

comment:9 by GerdP, 6 years ago

Keywords: download_along added; utilsplugin2 removed

comment:10 by GerdP, 6 years ago

In 14955/josm:

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

by GerdP, 6 years ago

Attachment: 17551-v2.patch added

comment:11 by GerdP, 6 years ago

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.

in reply to:  11 comment:12 by Don-vip, 6 years ago

Replying to GerdP:

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

Why? Where is it right now?

comment:13 by GerdP, 6 years ago

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

comment:14 by Klumbumbus, 6 years ago

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

comment:15 by GerdP, 6 years ago

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

comment:16 by Klumbumbus, 6 years ago

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 by GerdP, 6 years ago

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?

in reply to:  17 comment:18 by Klumbumbus, 6 years ago

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 by Klumbumbus, 6 years ago

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 by GerdP, 6 years ago

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

in reply to:  20 comment:21 by Klumbumbus, 6 years ago

Replying to GerdP:

I've never used it.

Me neither.

comment:22 by GerdP, 6 years ago

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 by GerdP, 6 years ago

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 by GerdP, 6 years ago

@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 6 years ago by GerdP (previous) (diff)

comment:25 by Don-vip, 6 years ago

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

comment:26 by GerdP, 6 years ago

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

comment:27 by GerdP, 6 years ago

Now Jenkins Job Sonar-JOSM-Plugins failed

comment:28 by Don-vip, 6 years ago

Cc: Don-vip removed
Milestone: 19.04

in reply to:  11 comment:29 by Klumbumbus, 6 years ago

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".

comment:30 by GerdP, 6 years ago

Resolution: fixed
Status: reopenedclosed

In 15028/josm:

fix #17551: Move "Download Along" into the File menu

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.