Mosaic Dataset Valueless Usage Scenario

The Mosaic DatasetPercent Clip is based on the histogram information of the image, and the Minimum Maximum, Standard Deviation and Gaussian are based on the Statistical Data of the image; 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 when the correct histogram and Statistical Data are obtained, can Stretch Display image be displayed correctly. Image histogram and statistical Data Information are stored in the *. Aux. XML file under the image directory at the same level, and the file name is the same as the corresponding image File Name. If the image in Mosaic Dataset is missing and has no value, or if there is no value information error, the Stretch Display effect will be abnormal.

The follow text will be presented in Compute Statistic Data , Calculate the histo gram , Build Overview and Create Image Pyramid are taken as examples to illustrate the function of Mosaic Dataset without value, and the corresponding exception handling method is given.

Correct Compute Statistic Data.

The image Minimum Maximum, Standard Deviation, and Gaussian displays are based on the image Statistical Data. If the image does not have Statistical Data, the program prompts you to calculate. If no value is missing in the image or the no value information is wrong, the Calculate Result error will be caused.

  • Image Files missing no value information

For example, a TIF image, Image Files itself has no valueless information (Figure 1-1), but the image has a valueless area (black area shown in Figure 1-2, the grid value of each band is 0), and the image is added to the Mosaic DatasetStandard Deviation display. The Statistical Data used for stretching did not exclude areas with no values, resulting in a large difference between the displayed results (Figure 1-3) and those after excluding no values (Figure 1-4).

The reason for this is that when Mosaic Dataset Compute Statistic Data, the default is to exclude the null in the Image Files, and if the Image Files do not contain null information (Figure 1-1), The Statistical Data of this image does not exclude the grid values of the regions with no values, resulting in the Stretch Display results of Figure 1-3.

When Mosaic Dataset No Value is introduced, if the Mosaic Dataset No Value Replaces Image Missing No Value (Figure 1-4) is enabled, at Compute Statistic Data, When there is no non-value information in Image Files, the image non-value will default to Mosaic Dataset non-value and exclude the value in the calculation, so that the image without non-value information can also obtain reasonable Statistical Data and Stretch Display effects.

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:

How to handle the exception in this example:

  1. Close all maps contain that Mosaic Dataset; if the Mosaic Dataset has images open for display, they must also be closed.
  2. As shown in Fig. 1-4, correctly set Mosaic Dataset null (null of each band is 0), check Replaces Image Missing No Value, and click "Apply" button to make the setting effective.
  3. The settings in step 2 will not change the existing Statistical Data of the image. You must Recalculate the Statistical Data of the image using the Compute Statistic Data GPA tool. Recalculate's Statistical Data capability is in development..
  4. Image already has Pyramid, need to Create Pyramid again.
  5. Reopening the Mosaic Dataset map shows the stretch effect correctly.
  • Image Files No Value Info Error

For example, a TIF image, Image Files, contains null information (null is 256), as shown in Figure 1-5 below, but the grid value of the actual image null area is 0, which belongs to the case of file null information error, and this kind of image is added to the Mosaic DatasetStretch Display. The Statistical Data used for stretching excludes 256 grid values in the no-value, non-no-value area, resulting in a large difference between the displayed results (Figure 1-6) and the results after excluding the correct no-value (Figure 1-7).

The reason for the above situation is that the grid value of the no-value non-image no-value area in Image Files, that is, the no-value information of Image Files is wrong.

When Mosaic Dataset No Value is introduced, if the Mosaic Dataset No Value Replaces Image Missing No Value is enabled and a Replaces all images with no value is enforced (Figure 1-7), In Compute Statistic Data, the null in Image Files is ignored, and the Mosaic Dataset null is used directly and excluded from the calculation. The correct Statistical Data and Stretch Display effects can also be obtained for images with no value information error.

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

How to handle the exception in this example:

  1. Close all maps contain that Mosaic Dataset; if the Mosaic Dataset has images open for display, they must also be closed.
  2. As shown in Figure 3-3, correctly set Mosaic Dataset null (null of each band is 0), and check Replaces Image Missing No Value and Replaces all images with no value. Click the Apply button to put the settings into effect.
  3. The settings in step 2 will not change the existing histogram information of the image. You must Recalculate the histogram of the image; use the Recalculate Histogram GPA tool to complete it. (Recalculate image histogram capability in development..)
  4. Image already has Pyramid, need to Create Pyramid again.
  5. Reopen the Mosaic Dataset map to display the stretch effect correctly, but you need to manually change the Image Layer's "No Value (RGB)" to the correct value of 0 to Transparent Display the No Value area.
  6. You can also reopen Mosaic Data and adjust the Stretch method to display the image correctly. The default value is Transparent Display.

Calculate the histogram correctly

The image percentage Stretch Display needs to be based on the image histogram information. If the image has no histogram, the program will prompt you to calculate it.

The histogram calculation requires the most value information of the image. If the image has Statistical Data, use the existing most value; otherwise, Recalculate the most value. The correct histogram Calculate Result can be obtained only when the Statistical Data of the image is correct.

For example, a TIF image, Image Files itself has no valueless information (Figure 2-1), but the image has a valueless area (white area as shown in Figure 2-2, the grid value of each band is 255), the image is added to the Mosaic DatasetPercent Clip for display. The histogram used in the stretch does not exclude the region of no value, resulting in a large difference between the displayed results (Figure 2-3) and those after excluding no value (Figure 2-4).

The reason for the above situation is that when Mosaic Dataset calculates the histogram, it excludes the no value in Image Files by default. If Image Files does not contain no value information (Figure 2-1), the image histogram will not exclude the grid value in the no value area. Resulting in the Stretch Display results of figs. 2-3.

After the introduction of Mosaic Dataset No Value, if the Mosaic Dataset No Value Replaces Image Missing No Value (Figure 2-4) is enabled, when calculating the histogram, if there is no No Value information in Image Files, Image No Value will default to Mosaic Dataset No Value and will be excluded from the calculation so that images with missing No Value information will also have a reasonable Histogram and Stretch Display effect.

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)

How to handle the exception in this example:

  1. Close all maps contain that Mosaic Dataset; if the Mosaic Dataset has images open for display, they must also be closed.
  2. As shown in Fig. 2-5, correctly set Mosaic Dataset without value, check Replaces Image Missing No Value, and click "Apply" button to make the setting effective.
  3. The settings in step 2 will not change the existing Statistical Data of the image. You must Recalculate the Statistical Data of the image using the Compute Statistic Data GPA tool. (Statistical Data capability for Recalculate images in development..)
  4. Image already has Pyramid, need to Create Pyramid again.
  5. Re-open the Mosaic Dataset map and the correct effect will be displayed.

Build Mosaic Dataset Right Overview

For example, a TIF image, Image Files, contains the correct no-value information. After it is added to the Mosaic Dataset, as shown in Figure 3-1, the correct Stretch Display effect can also be obtained without enabling the Mosaic Dataset no-value. After Mosaic Dataset Build Overview, the Stretch Display of the overview image is abnormal, as shown in Figure 3-2.

The reason for the above situation: when the overview is generated, if Mosaic Dataset No Value is not enabled, the generated overview Image Files (.tif) will not contain the No Value information, as shown in Figure 3-4. As a result, the Statistical Data of the overview image will not exclude the grid value of the No Value area. Stretch Display exception.

After introducing Mosaic Dataset No Value, if Mosaic Dataset No Value is enabled, after Build Overview, the overview view Image Files (.tif) will contain No Value information, as shown in Figure 3-5.

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

How to handle the exception in this example:

First (recommended):

  1. Close all maps contain that Mosaic Dataset; if the Mosaic Dataset has images open for display, they must also be closed.
  2. Correctly set Mosaic Dataset without value, check Replaces Image Missing No Value, and click "Apply" button to make the setting effective.
  3. Rebuild the Mosaic Dataset overview.
  4. Reopen the Mosaic Dataset map and it will display correctly.

The second:

In this example, there is only one image in the Mosaic Dataset. There is no need to reconstruct the overview. Use the following operation to obtain the correct Display Effects.

  1. Close all map containing this Mosaic Dataset.
  2. Correctly set Mosaic Dataset without value, check Replaces Image Missing No Value, and click "Apply" button to make the setting effective.
  3. Delete all Statistic Infomation files in the Image Files directory of the overview: *. TIF. Aux. XML.
  4. Reopen the Mosaic Dataset map and it will display correctly.

In addition, after enabling Mosaic Data No Value, the Mosaic Dataset overview is constructed, and the No Value in the image overlay area can also be removed, as shown in the following figure:

Correct Create Image Pyramid.

Image Pyramid is based on the original Image Files, such as.tifImage Files, whose Image Pyramid file is.tif. Ovr, and.tif. Ovr is also Image Files. When the original Image Files has the problem that the image has no no-value information, the no-value information error, and the like as described above, the created. TIF. OvrImage Pyramid has the same problem. This type of problem with Image Pyramid cannot be solved by enabling Mosaic Dataset No Value and re-Compute Statistic Data. Re-Create Image Pyramid via Mosaic Dataset.

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

How to handle the exception in this example:

  1. Close all maps contain that Mosaic Dataset; if the Mosaic Dataset has images open for display, they must also be closed.
  2. Correctly set Mosaic Dataset without value, check Replaces Image Missing No Value, and click "Apply" button to make the setting effective.
  3. Re-Create Pyramid to generate a pyramid image with the correct no-value information.

Brief summary

Mosaic Dataset has no value, which can solve the problem of abnormal Stretch Display effect when the image in Mosaic Dataset has no value or no value information error. The essence of the method is to correctly calculate the Statistical Data of the image, calculate the histogram of the image, Create Image Pyramid, construct the Mosaic Dataset overview and correctly remove the non-value area of the image by default (Transparent Display).

The effect of Mosaic DatasetStretch Display is correct. Sometimes it is necessary to process Image Pyramid, Image Statistical Data and Overview at the same time. The user may decide according to the actual situation. For example, Image Files has no value information error. After enabling the Mosaic Dataset reCreate Image Pyramid without value, if the Compute Statistic Data is not redone, the Pyramid Stretch Display still uses the Statistical Data that has an error. The result is also wrong, and the pyramid image and the Original Image can be displayed correctly only if the Compute Statistic Data is performed again.

Related topics

Optimize Mosaic Dataset

View Mosaic Dataset Properties