Pyramid Layers for QGIS and ArcGIS

Feb 17, 2014 | ArcGIS Desktop, GDAL, Imagery, QGIS

I guess I’ve been doing this way too long. I remember when pyramid layers on imagery was a bit “new” to those of us who had been plunking along with ArcINFO.

I’ve seen a few mentions in various places I’ve been hanging out about “My imagery is slow”. Invariably someone posts back “Build pyramids layers”. Of course I sorta bang my head on my desk and think “everyone should know…” BUT – not everyone does.

To thieve a bit from some ArcGIS Online help: Pyramids are reduced resolution representations of your dataset used to improve performance. Pyramids can speed up the display of raster data by retrieving only the data at a specified resolution that is required for the display. With pyramids, a lower-resolution copy of the data displays quickly when drawing the entire dataset. As you zoom in, levels with finer resolutions are drawn; performance is maintained because you’re drawing successively smaller areas.

So with ArcGIS pyramids are pretty much almost a default action. You can set to automatically build pyramids when you add an image. For instance today I was dealing with a 11 GB tif. Of course as I normally do I got a bit adventurous and did a few different things to build pyramid layers. Why? Because anyone can. Most of NRGS’s clients don’t deal with server environment. So if you deal with a lot of imagery it can get to be a hassle. You need to know about pyramid layers.

In this example we deal with ArcGIS and QGIS. Technically we’re dealing with ArcGIS and gdal. If you ever wondered if the pyramid file (.ovr) was viewable in both ArcGIS and QGIS – it is. Build it once and either can read it. There are three ways to go about building pyramid layers.

  • in ArcGIS: Proceed to ArcToolbox and go to Data management -> Raster -> Raster Properties. You can build pyramids there. ArcGIS has several defaults set. There’s several tools – one of which while build an entire directory of imagery.

arcgis_pyramids

  • in QGIS: Go to Raster -> Miscellaneous -> Build Pyramids. You’ve got a few more options “exposed” with this menu. Once again you can fill out all the particulars and let it build away. You even have an option to “clean” the pyramids which deletes them. You also have a nice little check box for processing an entire directory.

qgis_pyramids

So the interesting thing with the QGIS pyramid layer is the text box at the bottom. The pyramid building in QGIS is gdal. It’s the gdaladdo command specifically. If you notice at the bottom you have a command starting to take shape. So if you get fairly adventurous the entire command starts looking like:

gdaladdo -r average -ro –config COMPRESS_OVERVIEW JPEG –config USE_RRD NO –config JPEG_QUALITY 80 –config TILED YES –config PHOTOMETRIC_OVERVIEW YCBCR –config GDAL_CACHEMAX 10240 ortho_1-1_1n_s_al029_2013_1.tif 2 4 8 16

My only addition to that command is the –config GDAL_CACHEMAX 10240 portion. I’m telling gdal to use 10Gb of RAM to speed up processing. I run that from either a CMD tool or a shell.

Three ways to build pyramids. Why? Well – if you have a copy of ArcGIS do you want to tie it up building pyramids? Yes – you can create a separate process but why not leverage a another computer if you have one. If you have two machines and one license of ArcGIS….load QGIS. Load gdal on the server. With just a small amount of mix and match you’ve got more options and *hopefully* get slightly more flexible. Perhaps you pursue that elusive batch command that will run when you are at home. Like I said in the beginning – the pyramid file is usable by both ArcGIS and QGIS. So build it once and use it multiple places. Of course all of this is negated a bit if you have a image server. That’s another story for another time.

And with that – yes – I just babbled for one page about building pyramids layers for a raster file.

You may also like

TNGIC 2024

TNGIC 2024

So - if you're coming to the 2024 TNGIC (TN Geographic Information Council) meeting (April 9-11 2024) to talk about how no one understands what you do......I'm doing a workshop. What workshop? It's a new workshop. QGIS and LIDAR data. As to what I do with the class...

iNaturalist and QGIS

I am probably the worst for being able to properly name "things". There are big trees and little trees. There are the annoying bugs and the not so annoying bugs. There are ducks, birds, bigger birds, and the birds that hang out at my bird feeder. As much time as I...

Mergin Maps and DB Sync

Mergin Maps and DB Sync

I don't know if I would label this exercise as fun but I've learned alot. I don't do a ton of data collection these days. At one time a few years ago I was out in the field with Fulcrum, a laptop, and sketchy internet for days at a time. These days I'm hardly ever...