Feature request #10563

Show scales for pyramid creation

Added by Jonathan Moules over 10 years ago. Updated over 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Rasters
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:18970

Description

Currently in QGIS on the "Pyramids" tab on the right there is a "resolutions" box which actually has tile sizes for the pyramid levels.

The feature request is to replace these tile sizes with the native scales of the pyramids. This will allow users to make a more informed choice when creating their pyramids.

I envision something like:

Native Scales for pyramids:
(1:5000 - Raw Data)
1:10,000
1:20,000
1:40,000
1:80,000
1:160,000

The top item clearly differentiating and stating the native scale of the raw data (no pyramids).

History

#1 Updated by Jukka Rahkonen over 10 years ago

QGIS has now two tools for building overviews: In "Layer - Properties - Pyramids" and in "Raster - Miscellaneous - Build overviews". I think that the latter one is better and the other one could be removed. It gives UI for creating compressed overviews and custom overview levels and for power users it shows also the corresponding gdaladdo command in an editable text box.

The Properties-Pyramids tab reports under "Resolutions" something that for my mind means "Sizes" - how many pixels it takes to cover the whole layer. Gdalinfo reports the same like
Size is 12000, 12000
Pixel Size = (0.500000000000000,-0.500000000000000)
...
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Overviews: 6000x6000, 3000x3000, 1500x1500, 750x750, 375x375, 188x188

For me the most natural and exact unit for overviews is the one that is used as gdaladdo "levels" and in the "Raster - Miscellaneous - Build overviews" tool - the ratio of the pixel size in the overview to the native pixel size. I would say that the Native scale of 1:20000 is the most obscure alternative. Native scale on computer screen or on high resolution mobile device or on print? Compare with #6430. See also http://www.gdal.org/gdaladdo.html which recommends to use levels 2, 4, 8... for performance reasons.

#2 Updated by Etienne Tourigny over 10 years ago

the second one is in gdaltools (a core python plugin) which may not be available. It would be nice to create a new widget for this which could be used by both, with different back-ends doing the job (i.e. gdaladdo or gdal api).

#3 Updated by Etienne Tourigny over 10 years ago

Also note that using scales instead of sizes, while practical for the user, is not practical from a software perspective. The best way to build overviews is an integer fraction of raster size (2,4,8,16,etc). If you want the exact scale that will result in a fractional ratio between native size and overview size.

#4 Updated by Jonathan Moules over 10 years ago

I wasn't aware of the Raster - Miscellaenous - Build Overviews function. I'd agree that having the same function twice is sub-optimal (more maintenance for no user-gain).

I may not have been clear - I'm not suggesting users be able to manually type in their own scales. I'm suggesting that whatever the scales (that correspond to the 2 4 8 etc in GDAL) are be shown to the user instead of either 2 4 8 or "2000*2000" "1000*1000" etc. Neither of these later two will mean something to 95% of the users. And even though I know what they mean, the numbers themselves are still relatively meaningless because I don't know what scales they equate to (even approximately).

I'm not in any way suggesting changing the actual function of pyramid building, simply the interface to it.
I guess it could even show all of them, but again to a regular user none of them are going to mean anything.
Hope that's clearer.

#5 Updated by Paolo Cavallini over 10 years ago

  • Category set to Rasters

#6 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF