You are here: Reference > Hand-Editing Configuration Files > Configuring Catalogs Using XML Files > The BufferMergeRule Element

The BufferMergeRule Element

When two images overlap the mosaicker must choose between the top or bottom pixel. The BufferMergeRule element specifies how the mosaicker determines the output pixel. This element can be used to reduce tile boundary artifacts.

The BufferMergeRule has the following editable attributes:

method

The method attribute specifies which method is used to determine which pixel – top or bottom – is copied to the output image.There are two possible values for this attribute, as described below. The algorithms look at all the samples in the pixel for evaluation.

Best choice for uncompressed imagery:

pixelNonTransparent

This value uses the top pixel value if it does not equal the no-data value, otherwise it uses the bottom pixel value.

Best choice for compressed imagery:

pixelNonTransparentFuzzy

This value uses the top pixel's value when the difference between the top and the no-data values is greater than "fuzziness" (see fuzziness below). This method is the best choice for compressed imagery with overlapping tiles, such as DOQ quads. Note: If you set method to pixelNonTransparentFuzzy you must also set a value for fuzziness.

The default value for this attribute is pixelNonTransparentFuzzy.

More about the BufferMergeRule method options

The latter option, pixelNonTransparentFuzzy deals with the fact that compression changes the no-data value in an image. For example, black may still appear black but it is no longer numerically black (0,0,0).

The "fuzzy" method establishes a spherical zone around the no-data value and if a pixel value falls within that zone it is treated as the no-data value. A drawback of the fuzzy method is that the edges between no-data and valid data are smoothed (averaged) such that a narrow, dim region may appear between tiles (called "grout").

fuzziness

The fuzziness attribute defines a radius around the no-data value in determining which pixel – top or bottom – will be copied to the output image when two images overlap. The fuzziness attribute must be set when method is set to pixelNonTransparentFuzzy.

If the top value falls within the no-data sphere it is treated as a no-data value.

It is recommended that you experiment to arrive at the value that works best for your imagery. A reasonable experimentation range is 1 to 5.

The default value for this attribute is 3.

Examples: The BufferMergeRule Element

The following results in no-data areas that properly allow pixels in the bottom tile to "show through". This is a good example to follow for uncompressed imagery.

<Catalog enabled="true" name="Non">
      ...
...
<BufferMergeRule fuzziness="3" method="pixelNonTransparent"/>
...
...
   </Catalog>

The following results in dimmer grout (if any) in compressed, overlapping imagery and no "peaking through" of the bottom tile. Follow this example for DOQQs.

<Catalog enabled="true" name="Fuzzy">
      
...
...      
<BufferMergeRule fuzziness="3" method="pixelNonTransparentFuzzy"/>
...
...
   </Catalog>