Combine raster data into a mosaic

Inspect the raster data

First, you'll download and inspect the two raster datasets to determine how you need to prepare them before they can be combined.

  1. Download the Hallstatt_Mosaic project package.
  2. Browse to the downloaded file and double-click it to open the project in ArcGIS Pro. If necessary, sign in using your licensed ArcGIS account.
    Note:

    If you don't have access to ArcGIS Pro or an ArcGIS organizational account, see options for software access.

    The project shows the area of Hallstatt, Austria, with two side-by-side raster layers.

    Default project

    These raster layers are digital elevation models (DEMs). DEMs show the elevation of the ground or terrain. In this case, darker areas represent lower elevation and lighter areas represent higher elevation.

    The symbology seems to change abruptly from one DEM to the other, implying that there are dramatic changes in elevation. However, the abrupt change is actually caused by each DEM having its own range of values, as shown in the legend for each layer in the Contents pane:

    Legends for the DEMs

    The eastern DEM has a maximum value of about 750, while the western DEM has a maximum value of about 1,323. This difference in the range of values leads to the differences in symbology, as the lightest values in the east are relatively dark values in the west. By combining the two datasets into one, you'll be able to apply a consistent symbology across the entire area.

    Note:

    Elevation raster data comes from remotely sensed data, such as a lidar point cloud. To learn more about deriving elevation raster data and other types of information from a lidar point cloud, see the Extract 3D buildings from lidar data tutorial.

    When two raster datasets are combined, they should have the same cell size and coordinate system. You'll examine the properties of each DEM to determine if they do.

  3. In the Contents pane, double-click EastDEM40.tif.

    EastDEM40.tif in the Contents pane

    The Layer Properties window appears.

  4. Click the Source tab. Expand the Raster Information section.

    EastDEM40.tif raster information properties

    The Cell Size X and Cell Size Y values are both 0.4. In the Data Source section, the Vertical Units value is Meter. The cell size of the image is 0.4 meters, or 40 centimeters.

  5. Collapse the Data Source and Raster Information sections. Expand the Spatial Reference section.

    EastDEM40.tif spatial reference properties

    This raster uses the MGI Austria Lambert projected coordinate system.

  6. Close the Layer Properties window.
  7. In the Contents pane, double-click WestDEM50.tif. In the Layer Properties window, find the layer's cell size and projected coordinate system.

    This DEM has a cell size of 0.5 meters, or 50 centimeters. It uses the MGI Austria Lambert projected coordinate system, the same as the other DEM.

    Lastly, you'll determine the map's coordinate system to see if it is different from those used by the DEMs.

  8. Close the Layer Properties window. In the Contents pane, double-click Hallstatt Map.

    The Map Properties window appears.

  9. Click the Coordinate Systems tab.

    Coordinate Systems tab in the Map Properties window

    The map's coordinate system is MGI Austria GK Central, which is different from the coordinate system used by the DEMs.

  10. Close the Map Properties window.

    Based on what you discovered, you need to address the following two issues:

    • The two DEMs have different cell sizes (0.4 and 0.5 meters).
    • They use a coordinate system (MGI Austria Lambert) different from the one chosen for the project (MGI Austria GK Central).

    For these DEMs to be combined, they need to have the same cell size. You can change a raster layer's cell size by a process called resampling. The best practice is to resample the smaller pixel size (in this case, 0.4 meters) to the larger pixel size (in this case, 0.5 meters). You'll also reproject the DEMs to the MGI Austria GK Central coordinate system. You can change the projection when you combine the DEMs.

Resample a DEM

Next, you'll use the Resample geoprocessing tool to resample EastDEM40.tif to a cell size of 0.5 meters, matching WestDEM50.tif.

  1. On the ribbon, click the Analysis tab. In the Geoprocessing group, click Tools.

    Tools button

    The Geoprocessing pane appears.

  2. In the Geoprocessing pane, in the search bar, type Resample.
  3. In the list of search results, click Resample.

    Resample tool in the list of search results

    The Resample tool opens. The tool requires that you set several parameters before you can run the tool. First, you'll choose the input raster, which is the raster dataset you want to resample.

  4. For Input Raster, choose EastDEM40.tif.

    Next, you'll choose the output location and name of the resampled raster dataset. You want to save the output raster dataset as a TIFF file (.tif), which is the same type of file as the input raster. The default output location is the project geodatabase, but it's not possible to save a TIFF file in a geodatabase. You'll browse to the project folder and save the file there instead.

  5. For Output Raster Dataset, click the Browse button.

    Browse button for the Output Raster Dataset parameter

  6. In the Output Raster Dataset window, expand Folders and click Hallstatt_Mosaic.

    Hallstatt_Mosaic folder

  7. For Name, type EastDEM50.tif (including the .tif extension).

    Name field

  8. Click OK.

    The output location and name are set. Next, you'll choose the cell size of the output raster dataset. Though you know the exact cell size you want, you can choose another layer and automatically set the output cell size to that layer's cell size.

  9. For Output Cell Size, choose WestDEM50.tif.

    The X and Y parameters update to 0.5, matching the cell size of the layer you chose. Next, you'll set the resampling technique, which determines the process by which cells are changed. For elevation data, the bilinear resampling technique is the best choice.

    Tip:

    To learn more about the resampling techniques and the types of data they are appropriate for, point to the Resampling Technique parameter and point to its information button.

  10. For Resampling Technique, choose Bilinear.

    Resample tool parameters

    You'll also set the Snap Raster environment parameter. This optional parameter ensures that the output raster aligns perfectly with the edge of the WestDEM50.tif raster.

  11. Click the Environments tab.

    Environments tab

  12. Under Raster Analysis, for Snap Raster, choose WestDEM50.tif.

    Snap Raster environment parameter

  13. At the bottom of the Geoprocessing pane, click Run.

    The tool runs. A new layer, EastDEM50.tif, is added to the Contents pane. It is similar to EastDEM40.tif, but the cell size has been resampled from 0.4 to 0.5 meters.

Mosaic the DEMs

Next, you'll combine the rasters to create a mosaic using the Mosaic To New Raster tool. During the process, you'll also reproject the mosaic to the desired coordinate system.

  1. In the Geoprocessing pane, click the Open Another Tool button and choose Open Another Tool.

    Open Another Tool button and option

  2. Search for Mosaic To New Raster. In the list of results, click Mosaic To New Raster.

    As with the previous tool, you'll set the tool parameters before running it. First, you'll choose the input rasters you want to mosaic and set the output location and name.

    Note:

    The Mosaic To New Raster tool merges two or more rasters into a single, larger raster. This approach is appropriate when you only need to mosaic a few adjacent rasters together. However, for situations with many rasters, a more scalable mosaic dataset is the recommended data management structure.

  3. For Input Rasters, choose EastDEM50.tif and WestDEM50.tif.
  4. For Output Location, click the Browse button.
  5. In the Output Location window, under Project, click Folders. Click the Hallstatt_Mosaic folder to select it.

    Hallstatt_Mosaic folder in the Output Location window

  6. Click OK.
  7. In the Geoprocessing pane, for Raster Dataset Name with Extension, type Hallstatt_DEM.tif.

    Next, you'll choose the coordinate system for the output raster. You'll choose the same coordinate system as the current map.

  8. For Spatial Reference for Raster, choose Current Map [Hallstatt Map].

    The parameter is automatically populated with MGI_Austria_GK_Central, the coordinate system for the map.

    Next, you'll set the pixel type. You'll choose a larger pixel type, which can contain a larger range of values. You'll also choose a float pixel type, which enables decimal values.

    Tip:

    If you're not sure what pixel type to choose, you can review the pixel type of the input rasters. Open the Layer Properties window for the input rasters and click the Source tab. In the Raster Information section, the Pixel Type and Pixel Depth values indicate the raster's pixel type. The input rasters in this analysis have a pixel type of floating point and a pixel depth of 32 Bit.

  9. For Pixel Type, choose 32 bit float.

    Lastly, you'll set the number of bands. Imagery can have multiple bands that are used to visualize the data. Elevation data only has one band, however.

  10. For Number of Bands, type 1.

    Mosaic To New Raster tool parameters

  11. Click Run.

    The tool runs and the Hallstatt_DEM.tif layer is added to the map. It is a single seamless elevation raster, reprojected to the map's spatial reference.

    Map showing the mosaic

  12. Close the Geoprocessing pane.

Set the source type

By default, the new DEM has a generic source type. Setting an appropriate source type ensures that the raster will be rendered properly by default when displayed. When the source type is set to Elevation, the default stretch type is Minimum Maximum and the default resampling type is Bilinear, which are the best default options for elevation data.

You'll set the source type for the combined raster dataset. To do so, you must change the dataset itself, not the layer on the map. You'll remove the layer and make the change in the Catalog pane.

  1. In the Contents pane, right-click Hallstatt_DEM.tif and choose Remove.

    Remove option

    The layer is removed. You can find the dataset in the Catalog pane.

  2. On the ribbon, click the View tab. In the Windows group, click Catalog Pane.

    Catalog Pane button

    The Catalog pane appears. (It may have already been open.)

  3. In the Catalog pane, expand Folders and Hallstatt_Mosaic.

    Folders and Hallstatt_Mosaic folders

    The Hallstatt_DEM.tif dataset was saved to this folder.

    Note:

    If you don't see Hallstatt_DEM.tif, right-click the Hallstatt_Mosaic folder and choose Refresh. If you still don't see it, you may have saved it to a different output location.

  4. Right-click Hallstatt_DEM.tif and choose Properties.

    The Raster Dataset Properties window appears. It lists similar information to that in the Layer Properties window. In this window, you can confirm that the cell size is 0.5 meters and the projected coordinate system is MGI Austria GK Central.

  5. Under Raster Information, for Source Type, choose Elevation.

    Source Type value

  6. Click OK.
  7. In the Catalog pane, right-click Hallstatt_DEM.tif and choose Add To Current Map.

    The DEM is added back to the map. It's now ready to be used for visualization and analysis. You no longer need the DEMs you used to create the mosaic, so you'll remove them.

  8. In the Contents pane, right-click EastDEM50.tif and choose Remove. Remove WestDEM50.tif and EastDEM40.tif.

    Before you continue, you'll check the default rendering properties for the mosaic to ensure that the correct defaults for the Elevation source type are chosen.

  9. In the Contents pane, click Hallstatt_DEM.tif to select it.

    Hallstatt_DEM.tif in the Contents pane

  10. On the ribbon, click the Raster Layer tab. In the Rendering group, click the Stretch Type drop-down and confirm that Minimum Maximum is chosen.

    Stretch Type menu

  11. Click the Resampling Type button and confirm that Bilinear is chosen.

    The default rendering values are correct for the Elevation source type.

Symbolize the DEM

Next, you'll examine the default appearance of the DEM and change it to better show the elevation. To determine whether elevation is being displayed properly, you'll navigate to a smaller area of the map that shows the lake shoreline.

  1. On the ribbon, click the Map tab. In the Navigate group, click Bookmarks and choose Dark Shoreline.

    Dark Shoreline bookmark

    The map zooms in. However, the entire view is dark gray. It's impossible to tell where the shoreline begins. You'll change how the DEM is rendered so that it dynamically changes the rendering based on only the pixel values in the display extent.

  2. On the ribbon, click the Raster Layer tab. In the Rendering group, click DRA.

    DRA button

    DRA stands for dynamic range adjustment. When you turn on DRA, more shades of gray appear on the map.

    Dark Shoreline bookmark with DRA enabled

    This rendering is an improvement. However, it would be even better to display the elevation with a more appropriate color scheme.

  3. In the Contents pane, right-click Hallstatt_DEM.tif and choose Zoom To Layer.

    Zoom To Layer option

    The map zooms out to the full extent of the layer.

  4. Click the color ramp for Hallstatt_DEM.tif.

    Hallstatt_DEM.tif color ramp

    The Symbology pane appears.

  5. In the Symbology pane, for Color scheme, click the drop-down menu and check Show names. Choose Elevation #5.

    Elevation color ramp

    Now green colors represent low elevations and yellow and brown colors represent higher elevations.

    Hallstatt_DEM.tif layer with the Elevation #5 color ramp

    Since the lake and the nearby coastal land are almost at the same level of elevation, you can improve the visualization by displaying the water bodies as a vector layer on top of the DEM. For the purposes of this tutorial, a water body vector layer has already been included in the map.

  6. In the Contents pane, check the Hallstatt Lake check box.

    The lake polygon appears in light blue, clearly distinguishing water from land.

    DEM and lake polygon

    You'll save the symbolized DEM layer as a layer file so you can apply the same symbology to other layers.

  7. In the Contents pane, right-click Hallstatt_DEM.tif, point to Sharing, and choose Save As Layer File.

    Save As Layer File option

  8. In the Save Layer File window, browse to the Hallstatt_Mosaic folder. For Name, type DEM_layer.lyrx.
  9. Click Save.

    The layer file is saved. You can share the layer file or use it to change the symbology of other layers.

Compare the DEM to a DSM

Now that you've visualized the mosaic, you'll use it for comparison and analysis. First, you'll compare it to a digital surface model (DSM). A DSM is another type of elevation raster that shows the height of the surface, such as the top of the buildings or the top of the tree canopy. You'll inspect a DSM raster for the Hallstatt area and apply the same symbology to it as the DEM layer.

  1. In the Catalog pane, uncheck the Hallstatt_DEM.tif check box to turn it off and check the Hallstatt_DSM.tif check box to turn it on.

    The DSM layer appears on the map, with the lake layer still showing on top.

    DSM and lake layers

    You'll use the layer file you saved and apply its symbology to the DSM.

  2. In the Contents pane, click the color ramp for Hallstatt_DSM.tif.

    The Symbology pane changes to the show the symbology for the DSM.

  3. In the Symbology pane, click the options button and choose Import from layer file.

    Import from layer file option

  4. In the Import symbology window, browse to the Hallstatt_Mosaic folder and click DEM_layer.lyrx.

    Import symbology window

  5. Click OK.

    The symbology of the DEM is applied to the DSM. Next, you'll compare the two layers. If you hadn't created the mosaic, directly comparing the layers might have been difficult because the symbology would have been applied to different ranges of values. Now that the DEM and DSM cover the same area, a direct visual comparison is possible.

  6. Close the Symbology pane.
  7. On the ribbon, click the Map tab. In the Navigate group, click Bookmarks and choose Hallstatt.
  8. In the Contents pane, check the Hallstatt_DEM.tif check box to turn it on. Click Hallstatt_DEM.tif to select it.
  9. On the ribbon, click the Raster Layer tab. In the Compare group, click Swipe.

    Swipe button

  10. On the map, drag the pointer up and down or left and right to compare the DEM and the DSM.

    Swipe tool on the map

    The DSM is similar to the DEM overall, but its elevation values are slightly higher than those in the DEM. Also, its surface is not as smooth, and it appears to contain elevation data for buildings and vegetation. You'll zoom in to see more details.

  11. On the ribbon, click the Map tab. In the Navigate group, click the Explore button.

    Explore button

  12. In the Contents pane, uncheck Hallstatt_DEM.tif. On the map, zoom in to Hallstatt village.

    Due to the DRA setting, the stretch of the DSM automatically changes to show more details. The elevation data of buildings and vegetation is visible. The DSM includes the elevation of these surface features, while the DEM shows only the ground elevation.

    DSM showing the village buildings

    For reference, the following image shows how the village looks from the ground:

    Hallstatt shoreline
    Photo credit: KyOnChen on Flickr.

  13. In the Contents pane, right-click Hallstatt_DSM.tif and choose Zoom To Layer.
  14. Turn on Hallstatt_DEM.tif. Turn off Hallstatt_DSM.tif and Hallstatt Lake.

Create a slope layer

Lastly, you'll use the DEM for analysis. In particular, you'll use the DEM to create a slope layer, which shows where changes in terrain are steeper or flatter. Given the mountainous terrain in the area, a slope layer can help show where terrain can be traversed on foot.

To create the slope layer, you'll use a raster function. Raster functions are similar to geoprocessing tools, but generate on-the-fly data instead of a new dataset saved to your machine. In this tutorial, you're working with relatively small datasets, but when you have larger data, or when you want to experiment with tool parameters, raster functions create outputs more quickly.

  1. On the ribbon, click the Imagery tab. In the Analysis group, click the Raster Functions button.

    Raster Functions button

    The Raster Functions pane appears.

  2. In the Raster Functions pane, expand the Surface group.

    Surface raster functions

    This group contains many functions that work with elevation data.

  3. Click Slope.

    This function calculates the rate of change in the elevation (Z).

  4. For DEM, choose Hallstatt_DEM.tif. Confirm that Scaling is set to Degree.

    Slope Properties function parameters

  5. Click Create new layer.

    The Slope_Hallstatt_DEM.tif layer is added to the map. It represents slope in degrees.

    Slope layer on the map

    The lighter areas correspond to the steepest slopes. According to the legend in the Contents pane, the cell values vary from 0 to nearly 90 degrees. If you look closely at the map, it's possible to see switchback trails on the side of the mountain where the slope is relatively low compared to the surrounding area. These trails weren't visible in the DEM or DSM, which only showed elevation.

    The raster function output is only an on-the-fly result; it's not saved anywhere on your machine. You're satisfied with the result, so you'll export it to a saved file.

  6. Close the Raster Functions pane.
  7. In the Contents pane, right-click Slope_Hallstatt_DEM.tif, point to Data, and choose Export Raster.

    The Export Raster pane appears.

  8. In the Export Raster pane, for Output Raster Dataset, confirm that the output location is the Hallstatt_Mosaic folder. Change the output name to DEM_Slope.tif.

    Output Raster Dataset parameter

  9. For Pixel Type, choose 8 Bit Unsigned.

    Pixel Type parameter

  10. Click Export.

    The DEM_Slope.tif layer is created and added to the Contents pane and the map.

  11. In the Contents pane, remove Slope_Hallstatt_DEM.tif.
  12. On the Quick Access Toolbar, click the Save Project button.

    Save Project button

In this tutorial, you created a mosaic that combined two DEMs. First, you compared the cell size and coordinate systems of the two DEMs. Then, you resampled one of the DEMs so its cell size matched the other. After that, you created the mosaic, symbolized it, and used it for comparison and analysis.

For more tutorials about working with imagery layers, try the Prepare imagery and raster data for analysis series.

You can find more tutorials in the tutorial gallery.