Select to view content in your preferred language

Create Pyramids

4675
1
12-20-2011 05:54 AM
RichardWhite
Occasional Contributor
I'm looking for a command-line tool to create *.rrd pyramids.  I have over 200,000 *.tif files with world file and am looking for the fastest possible solution.  Is there an ISCmd to do this or separate utility?

I realize that I could do this with either a batch process in ArcCatalog or custom python script, but I'm trying to eliminate as much overhead as I can.

I vaguely remember a command-line utility from ESRI to do this, but I'm not finding anything.

Thanks, Richard
0 Kudos
1 Reply
PeterBecker
Esri Regular Contributor
First of all I would generally not recommend the generation of RRD files. Some users still do for backward compatibility.

In ArcGIS 10.0 the default method to create pyramids in ArcGIS was changed to using .OVR files. They were also supported in older 9.3 based Image Server. (I mention this as I�??m assuming that you may be still using this as you mention ISCommands). OVR files are actually TIF files with internal pyramids. They are given the same name as the original file but with the additional .ovr extension. The advantage is that they are fast to read and also enable different compression methods. You can create pyramids that are compressed even if the source data is not compressed. The other alternative is to use internal pyramids in the original files. This reduces the number of files and is backward compatible with older versions of most sw that does not support .ovr files, but its harder to remove the pyramids later, should you want to remove it.. I�??ll indicate how create internal pyramids below.

There are four ways you can create pyramids for large collections of rasters:

1) In ArcGIS use the �??DataManagement/Raster/RasterProperties/Build Pyramids And Statistics�?� tool. (available in 10.0). This enables the definition of a workspace and will optionally traverse all subdirectories and generate pyramids and statistics for each raster. This was designed specifically to do what you want to do. Ensure you set the Raster Storage Environmental Variables to define the required resampling and compression options.

2)  Create a python script to run the BuildPyramids_management function. This is documented with samples in the help system.

3) There is a �??Compress Imagery�?� tool in the Imagery samples gallery of the Resource Center.
See http://resources.arcgis.com/gallery/file/image-management/details?entryID=BCB3B8AB-1422-2418-3411-53...
This is a python processing tool that can be used to compress imagery using GDALTranslate and GDALaddo and includes options for creating pyramids. It can be easily modified to only create the pyramids and you will see internally it uses GDALAddo.

3) Create your own batch file to generate pyramids using the GDALAddo command (available from FWTools.maptools.org). The command line is:
gdaladdo.exe -r average -ro --config COMPRESS_OVERVIEW QQQQ --config USE_RRD NO --config JPEG_QUALITY 80 --config TILED YES --config PHOTOMETRIC_OVERVIEW RGB output.tif 2 4 8 16
You need to set appropriate parameters for QQQQ (NONE,JPEG,LZW); Refine or remove the JPEG_Quality parameters. The PHOTOMETRIC_OVERVIEW parameter depends on the type of imagery. If using natural color set to YCRCB else set to RGB.
If you want to create internal pyramids remove the �??ro flag.
If you want to create RRD files, set USE_RRD YES
Similar to GDALAddo, there is a GDALTranslate command that can be used to convert and potentially optimize the files eg by ensuring they are tile and compressing using JPEG or LZW compression.
0 Kudos