Mosaic dataset percentage truncation stretching is based on image histogram information, while minimum-maximum stretching, standard deviation stretching, and Gaussian stretching are based on image statistical data. If the image does not contain the corresponding information, the program will prompt you to calculate the histogram or statistical data when setting the stretch method. Only after obtaining the correct histogram and statistical data can the image be stretched and displayed correctly. The image histogram and statistical data are stored in the *.aux.xml file located in the same directory as the image, with the same file name as the corresponding image. If there are missing or incorrect No-Value information in the images within the mosaic dataset, it will lead to abnormal stretching display results.
The following examples will explain the role of mosaic dataset No-Value and provide methods to resolve corresponding issues, using examples such as calculating statistical data, computing histograms, creating overviews, and creating image pyramids.
Calculate Statistical Data
Image minimum-maximum stretching, standard deviation stretching, and Gaussian stretching display require image statistical data. If the image does not have statistical data, the program will prompt you to compute it. If the image is missing No-Value or has incorrect No-Value information, it will result in erroneous computation.
- Missing No-Value Information in Image File
For example, a TIFF image file itself does not have No-Value information (Figure 1-1), but the image contains No-Value regions (the black regions shown in Figure 1-2, where the raster values of all bands are 0). When this image is added to a mosaic dataset with standard deviation stretching, the statistical data used for stretching does not exclude the No-Value region, resulting in a display difference (Figure 1-3) when compared to excluding No-Value (Figure 1-4).
This happens because when the mosaic dataset computes statistical data, it defaults to excluding No-Value in the image file. If the image file does not contain No-Value information (Figure 1-1), the statistical data of the image will not exclude the No-Value area, resulting in the stretching display as seen in Figure 1-3.
After introducing the mosaic dataset no-value, if you enable the option to replace missing no-value in the image with the mosaic dataset no-value (Figure 1-4), the missing no-value will be treated as the mosaic dataset no-value and excluded during the calculation. This allows images missing no-value information to still obtain reasonable statistical data and correct stretching display.
![]() |
![]() |
Figure 1-1: Use GDAL tool to view tifFile Info | Figure 1-2: No Value Area Grid Value is 0 |
![]() |
![]() |
Figure 1-3: Statistical Data Does Not Exclude No Value | Figure 1-4: Valueless Replaces Image Missing No Value using Mosaic Dataset |
Attached: If Image Files contains no value information, the content is as follows:
Handling method for the exception issues in this example:
-
- Close all maps containing the mosaic dataset; if any images in the mosaic dataset are open and displayed, they must also be closed.
- As shown in Figure 1-4, correctly set the mosaic dataset no-value (all bands' no-value should be 0), check the option to substitute missing values with no-value, and click the "Apply" button to make the settings effective.
- The setting in step 2 will not change the existing statistics of the image; the image's statistics must be recalculated using the Calculate Statistics GPA tool. (Recalculation of image statistics capability is under development...)
- If the image already has pyramids, they need to be recreated.
- Reopen the mosaic dataset map, and the stretching effect will be correctly displayed.
- Image File with Incorrect No-Value Information
For example, a TIFF image file contains No-Value information (No-Value is 256) as shown in Figure 1-5. However, the actual image No-Value region has raster values of 0, indicating incorrect No-Value information in the file. When this image is added to the mosaic dataset for stretching, the statistical data used for stretching excludes the 256 No-Value, resulting in a significant display difference (Figure 1-6) compared to excluding the correct No-Value (Figure 1-7).
This issue occurs because the No-Value in the image file does not represent the image's actual No-Value region, which is an error in the No-Value information.
After introducing mosaic dataset No-Value, if you enable the option to force the replacement of all image No-Values (Figure 1-7), the calculation will ignore the image file’s No-Value and directly use the mosaic dataset No-Value, excluding that value in the calculation. This allows images with incorrect No-Value information to also achieve correct statistical data and stretching display.
![]() |
![]() |
Figure 1-5: Image Files No Value Error, Non-No Value Area Grid Value | Figure 1-6: Using the wrong no-value Compute Statistic Data. |
![]() |
|
Figure 1-7: Enable Mosaic Dataset No Value Force Override No Value for Image Error |
Handling Method for Abnormal Issues in This Example:
- Close all maps containing the mosaic dataset; if any images in the mosaic dataset are displayed, they must also be closed.
- As shown in Figure 3-3, correctly set the mosaic dataset no-value (all band no-value should be 0), and check the options to substitute missing values for images and substitute no-value for all images, then click the “Apply” button to make the settings take effect.
- The settings in Step 2 will not change the existing histogram information of the image, so the histogram must be recalculated; use the Recalculate Histogram GPA tool to complete this process. (Recalculating image histogram capability is under development...)
- If the image already has pyramids, they need to be recreated.
- Reopen the mosaic dataset map to correctly display the stretch effect, but you will need to manually modify the image layer's “no-value (RGB)” to the correct value of 0 for the no-value region to be displayed transparently.
- You can also reopen the mosaic dataset, adjust the stretching method, and the image will be correctly displayed with no-value areas by default shown transparently.
Calculate Histogram
Image percentage truncation stretching requires histogram information. If the image does not have a histogram, the program will prompt you to compute it.
Calculating the histogram requires the image’s minimum-maximum values. If the image has statistical data, it will use the existing minimum-maximum values; otherwise, it will recalculate them. Only if the image's statistical data is correct can the correct histogram be computed.
For example, a TIFF image file does not have No-Value information (Figure 2-1), but it has No-Value regions (the white areas shown in Figure 2-2, where the raster values of all bands are 255). When this image is added to the mosaic dataset for percentage truncation stretching, the histogram used for stretching does not exclude the No-Value region, causing a display difference (Figure 2-3) when compared to excluding the No-Value (Figure 2-4).
This issue arises because when the mosaic dataset computes the histogram, it defaults to excluding the No-Value in the image file. If the image file does not contain No-Value information (Figure 2-1), the histogram will not exclude the No-Value area, resulting in the display seen in Figure 2-3.
After introducing mosaic dataset No-Value, if you enable the option to replace missing No-Value in the image with the mosaic dataset No-Value (Figure 2-4), the missing No-Value will be treated as the mosaic dataset No-Value and excluded during the histogram calculation, allowing the image to achieve reasonable histogram and stretching display.
![]() |
![]() |
Figure 2-1: Use GDAL tool to view tifFile Info | Figure 2-2: No Value Area Grid Value 255 |
![]() |
![]() |
![]() |
![]() |
Figure 2-3: Histogram does not exclude no values | Figure 2-4: Enable Mosaic Dataset No Values Replaces Image Missing No Value (Histogram Excludes No Values) |
Handling Method for Abnormal Issues in This Example:
- Close all maps containing the mosaic dataset; if any images in the mosaic dataset are displayed, they must also be closed.
- As shown in Figure 2-5, correctly set the mosaic dataset no-value, check replace missing images with no-value, and click the "Apply" button to make the settings take effect.
- The settings in step 2 will not change the existing statistics of the image, and the statistics of the image must be recalculated; use the "Calculate Statistics GPA" tool to complete this. (Recalculation of image statistics is under development...)
- If the image already has pyramids, the pyramids need to be recreated.
- Reopen the mosaic dataset map, and the correct effect will be displayed.
Build Mosaic Dataset Overview
For example, a TIFF image file that contains correct No-Value information, when added to a mosaic dataset, can achieve correct stretching display even without enabling mosaic dataset No-Value (Figure 3-1). However, after building the overview, the overview image display becomes abnormal (Figure 3-2).
This happens because when generating the overview, if mosaic dataset No-Value is not enabled, the generated overview image file (.tif) will not contain No-Value information (Figure 3-4), resulting in the statistical data of the overview image not excluding the No-Value area during stretching, leading to abnormal display.
After introducing mosaic dataset No-Value, if you enable the mosaic dataset No-Value, the generated overview image file (.tif) will contain No-Value information (Figure 3-5), allowing the correct display after stretching.
![]() |
|
Figure 3-1: No Value Area Grid Value is 0 | |
![]() |
![]() |
Figure 3-2: Mosaic Dataset No Value Replaces Image Missing No Value Not Enabled | Figure 3-3: Enable the Mosaic Dataset No Value Replaces Image Missing No Value. |
![]() |
![]() |
Figure 3-4: Output Overview Image Does Not Contain Valueless Information | Figure 3-5: Output Overview Image Contains No Value Information |
Handling Method for Abnormal Issues in This Example:
First Method (Recommended):
- Close all maps containing the datasource.
- If any images in the datasource are open and displayed, they must also be closed.
- Correctly set the datasource's no-value, check the option for replacing missing image values with no-value, and click the "Apply" button to make the settings effective.
- Rebuild the datasource's overview.
- Reopen the map for the datasource, and it will display correctly.
Second Method:
In this example, the datasource contains only one image, so there is no need to rebuild the overview. You can also achieve the correct display effect with the following steps:
- Close all maps containing the datasource.
- Correctly set the datasource's no-value, check the option for replacing missing image values with no-value, and click the "Apply" button to make the settings effective.
- Delete all statistical files in the overview image directory: *.tif.aux.xml
- Reopen the map for the datasource, and it will display correctly.
Additionally, after enabling no-value for the datasource, rebuilding the datasource's overview can also remove the no-value from the image overlap areas, as shown in the following image:
Create Image Pyramids
Image pyramids are constructed based on the original image file, such as a .tif image file, with its image pyramid file being .tif.ovr. The .tif.ovr is also an image file. When the original image file has the aforementioned issues such as missing No-Value information or incorrect No-Value information, the created .tif.ovr image pyramid will have the same issues. These pyramid image issues cannot be resolved by enabling mosaic dataset No-Value and recalculating statistical data; they must be resolved by using the mosaic dataset to recreate the image pyramid.
![]() |
Figure 4-1: Mosaic Dataset No Value Not Enabled, Pyramid Image No Value Consistent with Image Files |
![]() |
Figure 4-2: Mosaic Dataset No Value Enabled, Pyramid Image No Value Consistent with Mosaic Dataset No Value |
Handling method for the exception issues in this example:
- Close all maps that contain the mosaic dataset; if the images in the mosaic dataset are displayed, they must also be closed.
- Correctly set the mosaic dataset no-value, check the option to substitute missing images with no-value, and click the "Apply" button to make the settings effective.
- Recreate the pyramid, and the pyramid images will be generated with the correct no-value information.
Summary
The mosaic dataset no-value can solve the issue of abnormal stretching display effects in mosaic datasets when there are missing no-value or incorrect no-value information. Essentially, it addresses the proper calculation of image statistics, calculation of image histograms, creation of image pyramids, construction of mosaic dataset overview maps, and the correct default removal of image no-value areas (displaying the no-value areas as transparent).
For the mosaic dataset stretching display effect to be correct, it may sometimes require handling the image pyramids, image statistics, and overview maps simultaneously. Users should decide based on the actual situation. For example, if there is an error in the no-value information of an image file, and after enabling mosaic dataset no-value to recreate the image pyramid, if the statistics are not recalculated, the pyramid's stretching display will still use the existing incorrect statistical data, resulting in errors. Only by recalculating the statistical data can the pyramid image and the original image be displayed correctly.
Related Topics
View Mosaic Dataset Properties