Opened 9 years ago
Closed 6 years ago
#13073 closed defect (duplicate)
After downloading data from OSM JOSM zooms out a little bit
| Reported by: | chrabros | Owned by: | chrabros |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | latest |
| Keywords: | template_report | Cc: | michael2402 |
Description
What steps will reproduce the problem?
- Download data from JOSM (Shift+Ctrl+Down)
- JOSM zooms out a little bit
What is the expected result?
The current view should stay the same
What happens instead?
The view zooms out a little bit, which is annoying
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-06-22 00:48:51 +0200 (Wed, 22 Jun 2016) Build-Date:2016-06-22 01:34:07 Revision:10453 Relative:URL: ^/trunk Identification: JOSM/1.5 (10453 cs) Windows 10 64-Bit Memory Usage: 989 MB / 989 MB (395 MB allocated, but free) Java version: 1.8.0_91-b15, Oracle Corporation, Java HotSpot(TM) Client VM VM arguments: [-Dsun.java2d.opengl=true, -Dswing.useSystemFontSettings=false, -Dfile.encoding=UTF8] Dataset consistency test: No problems found Plugins: - DirectDownload (32158) - DirectUpload (32158) - FastDraw (32158) - InfoMode (32158) - Mapillary (32158) - OpeningHoursEditor (32158) - RoadSigns (32177) - SimplifyArea (32158) - Tracer-testing (1457538387) - alignways (32161) - apache-commons (32158) - apache-http (32158) - buildings_tools (32158) - conflation (0.2.0) - contourmerge (1014) - czechaddress (32158) - dataimport (32287) - download_along (32158) - ejml (32158) - ext_tools (32158) - geotools (31895) - imagery_offset_db (32158) - imageryadjust (32158) - indoor_sweepline (32103) - jna (32158) - jts (31906) - junctionchecking (32158) - log4j (32158) - measurement (32324) - merge-overlap (32158) - native_password_manager (32158) - pdfimport (32158) - pointInfo (32158) - poly (32287) - public_transport (32158) - reltoolbox (32158) - splinex (32158) - tag2link (31923) - tagging-preset-tester (32158) - terracer (32158) - tofix (1466522948) - turnlanes (32158) - turnrestrictions (32158) - undelete (32158) - utilsplugin2 (32158) - wikipedia (32182) Tagging presets: - C:\OpenStreetMap\DJPresets.xml - C:\Temp\x\railway.xml - https://josm.openstreetmap.de/josmfile?page=Presets/BuildingPreset&preset&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/Communication_Towers&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/Czech_Slovak_addresses&preset&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/Czech_hiking&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/Freemap&preset&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/Towers&zip=1 - https://josm.openstreetmap.de/josmfile?page=Presets/Traffic_signs&zip=1 Last errors/warnings: - W: Old style SideButton usage for action org.openstreetmap.josm.gui.history.HistoryBrowserDialog$CloseAction@13be0c - W: Old style SideButton usage for action org.openstreetmap.josm.gui.history.HistoryBrowserDialog$ReloadAction@293aaf - W: Old style SideButton usage for action org.openstreetmap.josm.gui.history.HistoryBrowserDialog$CloseAction@c678d1 - W: Old style SideButton usage for action org.openstreetmap.josm.gui.history.HistoryBrowserDialog$ReloadAction@7e48d9 - W: Old style SideButton usage for action org.openstreetmap.josm.gui.history.HistoryBrowserDialog$CloseAction@1a034b0
Attachments (0)
Change History (5)
comment:1 by , 9 years ago
| Cc: | added |
|---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
But it happens constantly even when I use still the same image layers.
Therefore it has nothing to do with this feature, or the feature is incorectly implemented.
comment:4 by , 7 years ago
+1. IMHO it is annoying. When I just download what is currently visible on screen (i.e. hit Download, then download the preselected area without changing it), JOSM will zoom to the next lower layer.
What is apparently happening here is that after downloading JOSM zooms the downloaded area into view. Converting screen coordinates into lat/lon pairs and back never yields the exact same coordinates due to rounding, therefore the downloaded area may not fit perfectly into the visible screen area, and JOSM zooms out by one level to make it fit.
Possible approaches to tackle this would be:
- When showing the download window, keep a flag indicating whether the user modified the download area. Initially it is FALSE (indicating that we are downloading the current screen contents); as soon as the user starts dragging open a rectangle in the map view, it switches to TRUE. If the flag is FALSE, skip the zoom adjustment.
- Give the user an option such as “do not change zoom after download”
- When calculating the correct zoom, round off the values. Crop the smallest unit off each side of the downloaded rectangle (in coordinates or however JOSM expresses the download area), then convert to pixels, then subtract one pixel at each edge, then calculate the correct zoom. This may sacrifice a few pixels around the edges, but I don’t expect that to be a major issue—if I want to download a particular area, I uusally draw a somewhat generous rectangle around it.
comment:5 by , 6 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Closed as duplicate of #9260.



I think it's not an issue. There is a feature which automatically adjusts the zoom to match the image layer resolution. With this, you can avoid artefacts on the image layer. You can see a chessboard-like icon on the layer window near one of the layers.