Modify

Opened 12 years ago

Closed 9 years ago

#7630 closed enhancement (fixed)

Provide a "zoom to all downloaded" feature

Reported by: AM909 Owned by: team
Priority: normal Milestone: 15.04
Component: Core Version: tested
Keywords: zoom bounds Cc: AM909

Description

Currently, View->Zoom to Download zooms only to the last downloaded area. Because of the size limitations in the API, it is often necessary to build a layer with multiple downloads. There is currently no way to zoom to the union of the downloaded areas. Zoom to data usually includes far more area than needed because of large boundary polygons and the like that fall outside the download bounds.

A new feature View->Zoom to All Downloaded would zoom to the union of the individual download (or merged layer) bounds.

Attachments (2)

7630.patch (2.8 KB ) - added by simon04 12 years ago.
7630.2.patch (14.2 KB ) - added by harvey 9 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by skyper, 12 years ago

I wonder if Zoom to Download should not be adjusted to work like this ? Or is there any reason why it only takes the BBOX of last download action ?

comment:2 by simon04, 12 years ago

Why is "Zoom to data" insufficient?

comment:3 by AM909, 12 years ago

As I said, it shows far more than the downloaded area because of boundary and other long ways.

Download <bounds minlat='34.1419655' minlon='-118.2308936' maxlat='34.1501699' maxlon='-118.2206368' />. It's an area about 950x950 m. When you Zoom to Download, the scale is about 95m (for 10"x10" viewport).

However, if you Zoom to Data, you get an area of about 17000x17000 m (scale 1700 m), over 17x what is appropriate, and you can barely see the area of interest, much less edit it.

I do think it's useful to have both last download and union download features.

Last edited 12 years ago by AM909 (previous) (diff)

by simon04, 12 years ago

Attachment: 7630.patch added

comment:4 by simon04, 12 years ago

Summary: Provide a "zoom to all downloaded" feature[Patch] Provide a "zoom to all downloaded" feature

Patch attached. For the icon, $ cp images/dialogs/autoscale/{,all}download.png.

comment:5 by stoecker, 12 years ago

Hmm, I don't like this solution.

Another proposal: Make zoom to download toggle download areas. First call: Last download, second call previous, ... after circling all, then zoom to complete joined area, then again to last. When last zoom action is older than _config_value (e.g. 30 seconds), then start cycle from scratch.

Needs two variables: The last displayed download box number and the time when it was displayed.

comment:6 by stoecker, 11 years ago

Summary: [Patch] Provide a "zoom to all downloaded" feature[Patch needs rework] Provide a "zoom to all downloaded" feature

by harvey, 9 years ago

Attachment: 7630.2.patch added

comment:7 by harvey, 9 years ago

Patch reworked for "zoom to all downloaded" feature

comment:8 by stoecker, 9 years ago

Milestone: 15.03

comment:9 by stoecker, 9 years ago

Milestone: 15.0315.04

Move one month.

comment:10 by stoecker, 9 years ago

Resolution: fixed
Status: newclosed

In 8171/josm:

fix #7630 - provide a zoom to all downloaded areas function

comment:11 by stoecker, 9 years ago

Reworked your patch a lot. Solution was much easier. Also for the future - don't add non-related changes like formating stuff. I left some of these, but removed most.

comment:12 by skyper, 9 years ago

Resolution: fixed
Status: closedreopened

What steps will reproduce the problem?

  1. open a .gpx file
  2. press 5

What is the expected result?

Nothing

What happens instead?

NPE

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

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-04-16 01:31:12
Last Changed Author: simon04
Revision: 8199
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-04-15 23:51:33 +0200 (Wed, 15 Apr 2015)
Last Changed Rev: 8199

Identification: JOSM/1.5 (8199 en) Linux Debian GNU/Linux 7.8 (wheezy)
Memory Usage: 377 MB / 882 MB (259 MB allocated, but free)
Java version: 1.7.0_75, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u75-2.5.4-1~deb7u1

Plugins:
- OpeningHoursEditor (30962)
- conflation (0.1.7)
- download_along (30892)
- imagery-xml-bounds (31019)
- imagery_offset_db (31056)
- jts (31002)
- mirrored_download (30962)
- photoadjust (30964)
- reverter (30990)
- tag2link (31066)
- terracer (30892)
- todo (29154)
- undelete (30892)
- utilsplugin2 (31072)
- waydownloader (30892)
- wikipedia (31035)

Last errors/warnings:
- E: java.lang.NullPointerException

java.lang.NullPointerException
	at org.openstreetmap.josm.actions.AutoScaleAction.getBoundingBox(AutoScaleAction.java:270)
	at org.openstreetmap.josm.actions.AutoScaleAction.autoScale(AutoScaleAction.java:179)
	at org.openstreetmap.josm.actions.AutoScaleAction.actionPerformed(AutoScaleAction.java:190)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1662)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2870)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:307)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:263)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2962)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2954)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2833)
	at java.awt.Component.processEvent(Component.java:6293)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4872)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4698)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1887)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
	at java.awt.Component.dispatchEventImpl(Component.java:4742)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Window.dispatchEventImpl(Window.java:2719)
	at java.awt.Component.dispatchEvent(Component.java:4698)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:740)
	at java.awt.EventQueue.access$300(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:699)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:713)
	at java.awt.EventQueue$4.run(EventQueue.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:710)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

comment:13 by skyper, 9 years ago

Summary: [Patch needs rework] Provide a "zoom to all downloaded" featureProvide a "zoom to all downloaded" feature

comment:14 by stoecker, 9 years ago

Resolution: fixed
Status: reopenedclosed

In 8200/josm:

fix #7630 - NPE

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.