Create a mosaic dataset and extract features from imagery

To identify infrastructure vulnerable to natural hazards such as landslides, you must first know the infrastructure locations. You’ll download an ArcGIS Pro project package with all the data needed for this workflow and create a mosaic dataset to hold the imagery. You will then access a pretrained deep learning model in ArcGIS Living Atlas that uses artificial intelligence to automate the extraction of building footprints from an imagery layer.

Download a project package and open it

First, you’ll download the ArcGIS Pro package and open it. It contains all the data and maps you need for this tutorial.

  1. Download the Grenada-landslide-risk project package.

    A file named Grenada-landslide-risk.ppkx is downloaded to your computer.

    Note:

    A .ppkx file is an ArcGIS Pro project package and may contain maps, data, and other files that you can open in ArcGIS Pro. Learn more about managing .ppkx files in this guide.

  2. Locate the downloaded file on your computer. Double-click the file to open it in ArcGIS Pro. If prompted, sign in to your ArcGIS account.
    Note:

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

    The project opens.

    Initial project view

    The project contains two maps, Building footprint extraction and Susceptibility analysis, that you will use in different parts of this tutorial. For now, you’ll use the Building footprint extraction map.

  3. Verify that the Building footprint extraction tab is selected.

    Building footprint extraction tab

    The map contains a default topographic basemap depicting the world. Next, you’ll add imagery data.

Create a mosaic dataset

In this section, you’ll prepare the imagery dataset to extract the building footprints.

The project you downloaded includes aerial imagery representing a portion of Grenada island. You will now locate it in the project.

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

    Catalog Pane button

    The Catalog pane appears.

  2. In the Catalog pane, expand Folders, Grenada_landslide_risk, commondata, and Aerial-imagery.

    Folders, Grenada_landslide_risk, commondata, and Aerial-imagery expanded

    The Aerial_imagery folder contains 16 aerial images in the TIFF format.

    16 aerial images in the TIFF format

    For these images to behave like a single layer, you will create a mosaic dataset. First, you’ll create an empty mosaic dataset container, then you’ll add the imagery to it.

  3. On the ribbon, on the View tab, in the Windows group, click Geoprocessing.

    Geoprocessing button

  4. In the Geoprocessing pane, in the search box, type Create Mosaic Dataset. In the list of results, click the Create Mosaic Dataset tool to open it.

    Create Mosaic Dataset tool

  5. On the Create Mosaic DatasetParameters tab, for Output Location, click the Browse button.

    Browse button for Output Location

  6. In the Output Location window, click Databases, select grenada_landslide_risk.gdb, and click OK.

    Output Location window

  7. For Mosaic Dataset Name, type Grenada_aerial_imagery.
  8. For Coordinate System, click the Select coordinate system button.

    Select coordinate system button

    You want to use the coordinate system WGS 1984 Complex UTM zone 20N for all your project’s data, as it is a good choice for the island of Grenada location.

  9. In the Coordinate System window, in the search box, type WGS 1984 Complex UTM Zone 20N. Expand Projected Coordinate System, UTM, WGS 1984, Northern Hemisphere, select WGS 1984 Complex UTM Zone 20N, and click OK.

    Coordinate System window

  10. Accept the other default values and click Run.

    Run button for Create Mosaic Dataset tool

    The empty Grenada_aerial_imagery mosaic dataset appears in the Contents pane.

    Empty Grenada_aerial_imagery mosaic dataset in the Contents pane

    You will now add the 16 TIFF images to it.

  11. At the bottom of the Geoprocessing pane, click the Catalog tab.

    Catalog tab

  12. In the Catalog pane, expand Databases and grenada_landslide_risk.gdb.
  13. Right-click Grenada_aerial_imagery and choose Add Rasters.

    Add Rasters menu option

  14. Choose the following Add Rasters to Mosaic Dataset parameter values:
    • Under Input Data, choose Folder.
    • Under Input Data, click the Browse button. In the Input Data window, browse to Folders > Grenada-landslide-risk, commondata, and select Aerial_imagery. Click OK.

    Add Rasters To Mosaic Dataset parameter values

  15. Expand the Raster Processing section and check the Calculate Statistics and Build Raster Pyramids boxes.

    Raster Processing options

  16. Expand the Mosaic Post-processing section and check the Build Thumbnails and Update Overviews boxes.

    Mosaic Post-processing options

  17. Accept the other default values and click Run.
  18. When the process is complete, in the Contents pane, right-click Grenada_aerial_imagery and choose Zoom To Layer.

    Zoom To Layer menu option

    On the map, the mosaic dataset displays. The bright green lines show the boundaries of the 16 TIFF images.

    Mosaic dataset with image boundaries

  19. In the Contents pane, uncheck the box next to Footprint to turn the layer off.

    Footprint unchecked

    The imagery now displays as a single layer.

    Imagery displayed as a single layer.

  20. Zoom in and pan around the map to inspect the building locations more closely.

    Imagery details containing buildings

    There are hundreds of buildings in this part of Grenada. You could manually trace each building and store the footprints as features in a feature layer, but this would be tedious and time consuming. Instead, you will use deep learning to extract the building footprints automatically.

Extract building footprints using deep learning

Deep learning models can classify or detect features in imagery effectively. Building and training your own deep learning model or fine-tuning an existing pretrained model is an advanced task. The most difficult and time-consuming aspect of using deep learning is to create a series of training samples to teach a model to recognize the specific type of information that you are interested in. Alternatively, you can use an existing model that was already trained for you. ArcGIS Living Atlas of the World provides a growing library of such pretrained deep learning models. By using these models, you can get started right away with using artificial intelligence to extract information and gain insights from your imagery. Next, you will use a pretrained model from ArcGIS Living Atlas to detect building footprints from your imagery layer.

Note:

Using the deep learning tools in ArcGIS Pro requires that you have the correct deep learning libraries installed on your computer. If you do not have these files installed, ensure that ArcGIS Pro is closed, and follow the steps delineated in the Get ready for deep learning in ArcGIS Pro instructions. In these instructions, you will also learn how to check whether your computer hardware and software are able to run deep learning workflows and other useful tips. Once done, you can continue with this tutorial.

  1. In the Geoprocessing pane, click the Back button.

    Back button

  2. Click the Toolboxes tab.

    Toolboxes tab

  3. Expand Image Analyst Tools, and Deep Learning, and click the Detect Objects Using Deep Learning tool to open it.

    Detect Objects Using Deep Learning tool on Toolboxes tab

  4. Set the following Detect Objects Using Deep Learning parameter values:
    • For Input Raster, choose Grenada_aerial_imagery.
    • For Output Detected Objects, type Grenada_Buildings.
    • For Model Definition, click the Browse button.

    Detect Objects Using Deep Learning parameter values

  5. In the Model Definition window, under Portal, click Living Atlas. In the search box, type Building Footprint Extraction. Select Building Footprint Extraction - USA and click OK.

    Model Definition window

    Once you select the deep learning model, the model arguments load automatically.

  6. For threshold, type 0.6.

    Threshold argument with 0.6 value

    Note:

    The objects detected will only be added to the output dataset if the confidence level is equal to or greater than the threshold value. The optimal threshold value can be found by trial and error.

  7. Click the Environments tab.

    Environments tab

  8. For Processor Type, choose GPU.

    Processor Type set to GPU.

    Note:

    The tool may take 10 to 20 minutes to run, depending on your computer’s specifications. Optionally, you can test the tool on a smaller extent for a quicker processing time: zoom in to a 1:2500 extent and on the tool’s Environments tab, change Processing Extent to Current display extent.

  9. Accept all other default values and click Run.
    Tip:

    A warning window might display, indicating that the pretrained model is downloading. Just let the downloading process complete without taking any action.

    You can monitor the process progress below the Run button, and you can click View Details to see more information.

    View Details link

    When the process is complete, the result layer, Grenada_Buildings, appears in the Contents pane and on the map. It is a feature layer in which each polygon represents a building.

    Grenada_Buildings layer where each polygon represents a building.

  10. Optionally, in the Contents pane, right-click the Grenada_Buildings symbol and, in the color picker, choose a color that allows you to see that new layer clearly.

    Color picker for the Grenada_Buildings layer

  11. On the map, zoom in and inspect the Grenada_Buildings layer.

    Grenada_Buildings layer on the map

    You’ll use the Swipe tool to better compare the extracted buildings layer and the underlying imagery.

  12. In the Contents pane, ensure that the Grenada_Buildings layer is selected.

    Grenada_Buildings layer selected

  13. On the ribbon, on the Feature Layer tab, in the Compare group, click Swipe.

    Swipe button

  14. On the map, drag the swipe handle repeatedly from side to side to peel off the extracted buildings layer and reveal the imagery layer underneath.

    Swiping from side to side.

    Tip:

    When you are in swipe mode, you can pan on the map by pressing C on the keyboard and dragging with the mouse.

    You can observe that the model was successful in detecting nearly all the buildings.

    Note:

    If you apply this workflow on your own imagery data, in some cases, you might not be satisfied with the quality of the building detection results. In such a situation, a good next step would be to refine the pretrained model to work better on your data. See the Improve a deep learning model with transfer learning tutorial.

  15. When you are done exploring, on the ribbon, on the Map tab, in the Navigate group, click the Explore button to exit the swipe mode.

    Explore button

  16. On the Quick Access toolbar, click the Save button to save your project.

    Save button

In this first half of the workflow, you downloaded an ArcGIS Pro project package and opened it. You then created a mosaic dataset and added imagery to it. You used deep learning with a pretrained model from ArcGIS Living Atlas to extract building footprints from the imagery and store the results in a feature layer. Finally, you compared the extracted buildings to the original imagery.


Perform landslide susceptibility analysis

Now that you know the building locations, you must identify the areas in Grenada that are susceptible to landslides. For this analysis, you'll use four raster layers, and apply them to several raster functions gathered into a single raster function template. Finally, you’ll compare the landslide susceptibility result layer to the extracted buildings layer to identify the structures that are most at risk.

Explore raster layers

To analyze landslide susceptibility, you'll use as input four raster layers in the TIFF format. Each one represents a major factor in landslide risk assessment:

  • Soil type—Areas with specific types of clay in the soil are at higher risk of landslides.
  • Elevation—Areas with steeper slopes are at higher risk.
  • Distance from rivers—Areas closer to rivers are at higher risk.
  • Land use—Areas with roads, buildings, and areas that are artificially vegetated are at higher risk; forested areas are at lower risk.

You’ll now explore the four layers.

  1. Click the Susceptibility analysis map tab.

    Susceptibility analysis map tab

    The Susceptibility analysis map appears, with the four layers listed in the Contents pane. All are currently turned off.

  2. In the Contents pane, check the box next to the Land_use.tif layer to turn it on.

    Land_use.tif layer turned on.

  3. Examine the Land_use.tif layer on the map along with its legend in the Contents pane. Zoom in and pan to better understand the information contained in the layer.
  4. Similarly, turn on and examine Distance_to_rivers.tif, Elevation.tif, and Soil_types.tif.

    Four input rasters for the susceptibility analysis
    (A) Land use, (B) Distance to rivers, (C) Elevation, (D) Soil types.

    Tip:

    Expand the Soil_types.tif layer in the Contents pane to see its legend. Then close it when you are done, as the legend takes a lot of space.

    Soil_types.tif layer expanded

Next, you’ll use these layers as input to your landslide susceptibility analysis.

Create a susceptibility layer using a raster function template

You will perform the susceptibility analysis using the four raster layers as input. You will apply to them several raster functions gathered (or chained) together into a single raster function template (RFT). This RFT is provided in the project package you downloaded. First, you will open the RFT in edit mode to examine its content.

Note:

Raster functions are operations that apply processing to rasters dynamically without saving the result to disk. Since no intermediate datasets are created, processes can be applied quickly.

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

    Raster Functions button

  2. In the Raster Functions pane, click the Project tab. If necessary, expand the Grenada_landslide_risk section.

    Grenada_landslide_risk section expanded.

  3. Right-click the Landslide Susceptibility RFT and choose Edit.

    Edit menu option

    The RFT appears in the function editor window.

    Raster function template in edit mode.

    The four green elements in the RFT represent the four raster inputs. Each yellow element represents a raster function. The process goes as follows:

    • First, some rasters are preprocessed, for instance, the Elevation raster is transformed into a slope raster in which each cell identifies the steepness of the terrain at its specific location (Slope function).
    • Each raster is then processed, so that the original value of each cell is transformed into a 1-to-10 value, with 10 representing the highest landslide risk and 1 representing the lowest (the Remap or Calculator function).
    • The four result layers are then combined (Weighted Sum) and transformed into an output raster in which each cell contains a 1-to-5 value representing the overall landslide susceptibility score (Remap: Classify Results).
    • Finally, labels are attached to the 1-to-5 numeric values to represent 5 classes of risk (Very Low, Low, Moderate, High, Very High) and are symbolized with a relevant color scheme (Attribute Table).
  4. Optionally, double-click some of the raster functions in the RFT to see how they are set up.
  5. When you are done with your review, close the Landslide Susceptibility.rft.xml function editor window.

    Close button for the function editor window

    You will now apply the RFT to your data.

  6. In the Raster Functions pane, click the Landslide Susceptibility RFT to open it.

    Click the Landslide Susceptibility RFT to open it.

  7. Choose the following Landslide Susceptibility parameters:
    • For Soil Types, choose Soil_types.tif.
    • For Elevation, choose Elevation.tif.
    • For Land Use, choose Land_use.tif.
    • For Distance to Rivers, choose Distance_to_rivers.tif.

    The four Landslide Susceptibility parameters

  8. Click Create new layer to generate the susceptibility analysis layer.

    The result layer appears.

    Landslide Susceptibility layer

    The red areas are the most susceptible to landslides, and the green areas the least.

In this section, you ran a raster function template to create a landslide susceptibility raster layer.

Compare building footprints to the landslide susceptibility results

You will now compare visually the building footprints you extracted earlier to the landslide susceptibility layer with the goal of identifying at-risk structures. First, you’ll add the building footprints layer to the current map.

  1. Click the Building footprint extraction tab to go to the first map.

    Building footprint extraction tab

  2. In the Contents pane, right-click Grenada_Buildings and choose Copy.

    Copy menu option

  3. Click the Susceptibility analysis tab to return to the second map.

    Susceptibility analysis tab

  4. In the Contents pane, right-click Susceptibility analysis and choose Paste.

    Paste menu option

    The Grenada_Buildings layer is added to the map.

  5. Right-click the Grenada_Buildings layer and choose Zoom To Layer.

    Zoom To Layer menu option

  6. The map zooms in to the area where you extracted the buildings using the deep learning model.

    Extracted buildings displayed over the Landslide Susceptibility layer.

    Note:

    To ensure the brevity of this tutorial, you only extracted the building footprints for a portion of the island. In a real-life setting, you might choose to extract the building footprints for the entire island instead.

  7. For faster display, turn off all input data layers (Soil_types.tif, Elevation.tif, Land_use.tif, and Distance_to_rivers.tif).
  8. Zoom and pan through the map to identify buildings that are in high-risk areas (in red or orange).

    Some buildings in high-risk areas

    It appears that most buildings in Grenada are in lower-risk areas. However, some buildings appear in high-risk zones (orange).

    You’ve been using the Landslide Susceptibility layer successfully to locate at-risk buildings. However, it is a dynamic layer that exists only in memory, as it was generated with raster functions. You will now persist it to your computer storage for future reuse and to share it more easily with your colleagues and community.

  9. In the Contents pane, right-click the Landslide Susceptibility layer, point to Data, and choose Export Raster.

    Export Raster menu option

  10. In the Export Raster pane, set the following parameter values:
    • For Output Format, verify that TIFF is selected.
    • For Coordinate System, verify that WGS_1984_Complex_UTM_Zone_20N is selected.

    Export Raster parameters

  11. Under Cell Size, for X and Y, type 5.

    X and Y set to 5.

    Each cell of the raster output will represent a square on the ground surface that measures 5 meters by 5 meters.

  12. Accept all other default values and click Export.

    After a few moments, the new raster appears on the map. It looks similar to the dynamic layer. However, you can find it saved in the Catalog pane.

  13. In the Catalog pane, under Folders > Grenada_landslide_risk, locate Landslide Susceptibility.tif.

    Persisted layer in the Catalog pane

  14. Click Ctrl+S to save your project.

In this tutorial, you used imagery and other types of raster data to study structures at risk of landslide on the island of Grenada. In ArcGIS Pro, you created a mosaic dataset and added aerial imagery to it. You then accessed a pretrained deep learning model in ArcGIS Living Atlas and used it to automate the extraction of building footprints from the aerial imagery layer. Next, you used a raster function template to perform raster analysis and classify the landscape according to landslide susceptibility. You compared the landslide susceptibility layer and the extracted building footprints to visualize the structures at risk. Finally, you persisted the landslide susceptibility raster to disk. Your result layers are now available for use in further mapping and analysis workflows by you or by other members in your community.