This is the 16th day of my participation in the August More Text Challenge
1. The pyramid
1.1 define
Pyramids can be used to improve performance. They are reduced sampled versions of the original raster dataset and can contain multiple reduced sampled layers. Each successive layer of the pyramid is sampled in a 2:1 ratio. Here is an example of a two-level pyramid created for a raster dataset:
Figure 1-1 Example pyramid
1.2 role
The pyramid speeds up the display of raster data by retrieving only data that uses a specified resolution, depending on the display requirements. Using pyramids, lower resolution copies of the data can be quickly displayed while the entire data set is plotted. As the zoom operation progresses, each of the finer resolution levels will gradually be drawn; But the performance stays the same because you are drawing smaller areas in succession. The database server automatically selects the most appropriate pyramid level based on the user’s display ratio. If pyramid is not used, the entire data set must be read from disk and then resampled to a smaller size. This is called “display resampling” and occurs when the ArcGIS display is refreshed.
The pyramids are built once per raster dataset and then accessed each time the raster dataset is viewed. The larger the raster data set, the longer it takes to create the pyramid set. However, it can also mean saving more time in the future.
Although it is not possible to build a pyramid for a raster catalog, it is possible to build a pyramid for each raster data set in a raster catalog. Mosaic data sets are similar to raster directories. You can build a pyramid for each raster dataset in a Mosaic dataset; When building a pyramid for a Mosaic dataset, you can only use a specific tool in the Mosaic dataset toolkit.
2. Construction method
2.1 Construction of mono image pyramid
ArcToolbox->Data ManagementTools->Raster->Raster Properties->Build Pyramids
For the single shot that has not yet built the pyramid, when the image is added to the ArcMap window, the prompt “whether to build the pyramid” will be given, and the pyramid can also be built at this time.
2.2 Mass image pyramid construction
ArcToolbox->Data ManagementTools->Raster->Raster Properties-> Build Pyramids And Statistics
For images with a large amount of data, it is recommended to use batch tools for pyramid construction
Or ArcToolbox->Data ManagementTools->Raster->Raster Properties-> Batch Build Pyramids
Speed up pyramid construction
There are several parameters that can be set during pyramid building, and they are the secret to accelerating pyramid building. As shown above
(1) Pyramidlevels (optional)
Pyramid levels are the number of pyramid levels built. The default level is -1, at which point the complete image pyramid is built. If I set this to null, I get the same effect as negative 1.
If set to 0, no pyramid will be built. This is also the way to delete the image pyramid.
The highest level of the pyramid can be set to 29, and any value above 29 is treated as -1.
If you follow the default Settings, the complete image pyramid will take a long time, so you can set the pyramid level according to your needs.
(2) Re-sampling method Pyramidresampling Technique (optional)
There are generally three resampling methods: BILINEAR interpolation (BILINEAR), NEAREST pixel method (NEAREST) and CUBIC convolution. Among them, the nearest pixel method has the fastest speed. If the image edge is not very high, it is the best method to use. The third convolution is the slowest due to too many reference points and complex operation, but the grayscale effect of resampled image is better.
Bilinear difference method is recommended for images. For discrete data, the nearest neighbor pixel method is recommended.
(3) Pyramidcompression Type (optional)
Five compression modes are provided:
- Default – Pyramid uses JPEG compression if source data is compressed using wavelet; Otherwise, LZ77 compression method is used.
- LZ77 — Lossless compression, suitable for any type of data.
- JPEG — Lossy compression, select JPEG compression, you can set the compression quality. For image data, this compression method is usually selected. If the image quality is not high, the compression ratio can be set to 25.
- JPEG_YCbCr — lossy compression, using brightness (Y) and chroma (Cb and Cr) color space components.
- NONE — Does not compress the pyramid.
(4) Set the environment variable Parallel Processing Factor
Our computer is multi-core, through the environment variable parallel processing factor setting can improve GP tool processing speed.
Settings: GP Tools panel — >Environments — >ParallelProcessing
The parallel processing factor is set as a number or percentage. If set as a percentage, the final number of processes will be the result or an approximation of the number of CPU cores on the computer multiplied by the percentage. For example, a 4-core computer.
- If set to 50%, two processes will be enabled. (50% * 4 = 2)
- If set to 66%, three processes will be enabled. (66% * 4 = 2.64, approximately 3)
- If set to 100%, four processes will be enabled. (100% * 4 = 4)
Of course, you can also set the value directly.
- Null – The default setting. Different tools use different number of processes.
- 0 — No parallelism.
- N — Specifies the number of processes. The number of processes cannot exceed the number of CPU cores.
4. Delete the build
Delete pyramid files. Img format is the most common image format. When the image data is less than 2G, Img stores the image, and RRD is the generated image pyramid file. When the image data is larger than 2G, IMG becomes an index file, ArcMap generates ige image format to store raster data, AND RRD is the generated image pyramid file. When the pyramid file (RRD) exceeds 2GB, RDE file is created to store the pyramid. Therefore, when rebuilding the pyramid, you need to delete the RRD and RDE files. In case the pyramid reconstruction fails, you can back up your data.
5. Other blogs
Blog address
Blog Address 2