Monday, 16 October 2017

arcgis desktop - Is ArcMap's Fixed Zoom In/Out algorithm documented anywhere?


I only occasionally use the Fixed Zoom In/Out buttons on the Tools toolbar of ArcMap and had always assumed that they zoomed in/out by a set scale factor.


However, using ArcGIS for Desktop 10.2, I just set my scale to be 1:10,000,000 and then hit the Fixed Zoom In button 10 times while recording the subsequent scale each time and was surprised to see:


10,000,000
8,000,000
6,000,000
5,000,000

4,000,000
3,000,000
2,500,000
2,000,000
1,500,000
1,250,000
1,000,000

Dividing each scale denominator by its successor shows a sequence of: 1.25, 1.33, 1.2, 1.25, 1.33, 1.2, 1.25, 1.33, 1.2


Curious about what happened in between the scales above I experimented a little to discover that the first issuance of the Fixed Zoom In button simply takes the scale to the first of those listed above and then starts following the same pattern. Try starting with 1:8,000,001 to see ...



8,000,001
8,000,000
6,000,000
5,000,000
4,000,000
3,000,000

This seems like quite a neat solution, but not one that I had realised was in place - does anyone know if it has been documented anywhere?


I've looked in the Online Help without success.


In answer to @DevdataTengshe, the scales currently in my available list (see below) seem to bear no relation to those used by Fixed Zoom In/Out.



enter image description here


However, when I add 1:7,500,000 into my available list it does seem to insert that as an additional scale step ...


10,000,000
8,000,000
7,500,000
6,000,000
5,000,000
4,000,000

This makes the algorithm being used even more mysterious to me.




Answer



I have tested this behavior on ArcGIS Desktop 9.3.1 & ArcGIS 10.0
The behavior has changed between 9.3.1 and 10.0; with 10.0, you see the same behavior that PolyGeo has mentioned. With ArcGIS 9.3.1, the zoom in/out factor was always 1.25 from the current scale.


After some testing, the behavior of 10.x is quite easy to decipher; ArcMap internally has a set of scales which are used by these tools. These scales are:


250,000,000
200,000,000
150,000,000
125,000,000
100,000,000
80,000,000

60,000,000
50,000,000
40,000,000
30,000,000
25,000,000
20,000,000
15,000,000
12,500,000
10,000,000
8,000,000

6,000,000
5,000,000
4,000,000
3,000,000
2,500,000
2,000,000
1,500,000
1,250,000
1,000,000
and so on.


If you have not touched your scale settings, you'll see that the scales there are a subset of the above scales.


If you manually add a custom scale, such as 7,500,000, then the custom scale is added to the above internal zoom levels; ArcMap's fixed Zoom in and Fixed Zoom out will use the modified set of zoom levels


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...