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 )
What steps will reproduce the problem?
- Load attached gpx file
- Right click on layer and select "Download from OSM along this track"
- Select 20m, 5 km² and track only in the popup
- Click Download -> 9 should require individual download request
- 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
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)
Change History (35)
by , 6 years ago
Attachment: | jumpto.PNG added |
---|
by , 6 years ago
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Cc: | added |
---|---|
Keywords: | utilsplugin2 added |
comment:3 by , 6 years ago
Description: | modified (diff) |
---|
by , 6 years ago
Attachment: | 17551.patch added |
---|
Patch which duplicates code from DownloadAlongWayAction
comment:4 by , 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 , 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 , 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 , 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 , 6 years ago
(for SVN plugins). If this is a Github plugin, remove the entry from PluginsSource.
by , 6 years ago
Attachment: | sample.gpx added |
---|
comment:9 by , 6 years ago
Keywords: | download_along added; utilsplugin2 removed |
---|
by , 6 years ago
Attachment: | 17551-v2.patch added |
---|
follow-ups: 12 29 comment:11 by , 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.
comment:12 by , 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:14 by , 6 years ago
Usually the "Tools" menu is used by core features and the "More Tools" menu by plugins.
comment:15 by , 6 years ago
If this is a problem I can also change the code so that we keep the plugin.
comment:16 by , 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.
follow-up: 18 comment:17 by , 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?
comment:18 by , 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 , 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:22 by , 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:24 by , 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?
comment:25 by , 6 years ago
comment:28 by , 6 years ago
Cc: | removed |
---|---|
Milestone: | → 19.04 |
comment:29 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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".
Although
DownloadAlongTrackAction
andDownloadAlongWayAction
should do more or less the same the sources are very different.The code in
DownloadAlongWayAction
provides the better solution using the private methodscalcBetween()
andcalcScale()
.I think it would be best to move all the code that calculates the areas into the base class
DownloadAlongAction
.