English

Problem: Running the Hillshade tool on raster images produces a gap between adjacent images

Description

In some instances, creating shaded relief of raster images using the Hillshade tool on each image produces a gap between adjacent images.

The following image shows the gap between adjacent images after running the Hillshade tool in ArcGIS Pro.

There are gaps between the adjacent images after running the tool on each image individually.

Cause

This is expected behaviour. Running the Hillshade tool on a raster image sets the pixels at the border of the image to NoData. If there is more than one raster image in the project and the tool is running on each image, it produces a gap between the images.

Solution or Workaround

To resolve this issue, create a new mosaic dataset and add the raster images to the mosaic dataset. Then, run the Hillshade tool on the mosaic image layer.

Note:
This solution still leaves the pixels at the border of the mosaic dataset as NoData, but eliminates the gap between the individual raster images.
  1. In ArcGIS Pro, create a new mosaic dataset in the geodatabase.
    1. Under Output Location, browse to the geodatabase path.
    2. Under Mosaic Dataset Name, set a name for the new mosaic dataset.
    3. Under Coordinate System, select the coordinate system for all the items in the mosaic dataset.
    4. Click Run.

      Create a new mosaic dataset in the geodatabase.
       
  2. Add the raster images to the mosaic dataset from the images file.
    1. Right-click the mosaic dataset created in step 1, click Add Rasters or search the Add Rasters To Mosaic Dataset tool in the geoprocessing pane.
    2. Under Mosaic Dataset, browse to the path and name of the mosaic dataset to which the raster data will be added.
    3. Under Raster Type, select which type of raster from the drop-down list.
    4. Under Input Data, browse to the raster images file and add the images.
    5. Click Run.

      Add raster images to the mosaic dataset from file.
       
  3. Calculate statistics for the mosaic dataset.
    1. In the Catalog pane, right-click the mosaic dataset and click Calculate Statistics or search the Calculate Statistics tool in the Geoprocessing pane.
    2. Under Input Raster Dataset, set the input raster dataset or mosaic dataset.
    3. Click Run.

      Calculate statistics for the mosaic dataset.
       
  4. Run the Hillshade tool on the mosaic image layer.
    1. In the Geoprocessing pane, navigate to 3D Analyst Tools > Raster Surface > Hillshade.
    2. Under Input raster, set the mosaic image layer.
    3. Under Output raster, set a name and location for the new hillshade.
    4. Click Run.

      Run the Hillshade tool
       

The image below shows the shaded relief of the mosaic dataset without a gap between the adjacent images after running the Hillshade tool.

The shaded relief of the mosaic dataset without any gap between the images.

Related Information