Extract high-resolution land cover with GeoAI

Create a project and get the input data

To get started, you'll create an ArcGIS Pro project and obtain the input data needed for the workflow.

  1. Open ArcGIS Pro. If prompted, sign in using your ArcGIS account.
    Note:

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

  2. Under New Project, select Map.

    Map button

  3. In the New Project window, set the following parameters:
    • For Name, type Alexandra_Land_Cover.
    • For Location, click the Browse button and choose a folder location of your choice.

    New project window

  4. Click OK.

    The project opens. For now, it displays only the default basemap.

    Initial view

    You'll add drone imagery representing a neighborhood of the Township of Alexandra in South Africa. The imagery is high resolution, with each pixel representing a square of about 2.5 by 2.5 centimeters on the ground. It was captured by South Africa Flying Labs. The layer is stored in ArcGIS Online as an image tile service.

    Note:

    South Africa Flying Labs is a nonprofit organization that produces drone imagery in South Africa and seeks to empower local communities with the knowledge and skills necessary to solve social problems in that country.

  5. On the ribbon, click the Map tab. In the Layer group, click the Add Data button.

    Add Data button

  6. In the Add Data window, under Portal, click ArcGIS Online. In the search box, type Alexandra_Orthomosaic owner:Esri_Tutorials and press Enter. In the list of results, click the layer named Alexandra_Orthomosaic and click OK.

    Add Data window

    The tiled image layer appears, and the map zooms in to it.

    Alexandra_Orthomosaic imagery on the map

    Note:

    This True Ortho image layer was derived from multiple drone images. It was generated in the Site Scan for ArcGIS application and saved to ArcGIS Online directly from Site Scan.

    To apply the workflow proposed in this tutorial to your own imagery, see the Apply this workflow to your own imagery section at the end of the tutorial for tips.

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

    Next, you'll download the High Resolution Land Cover Classification – USA deep learning package from ArcGIS Living Atlas. This deep learning package is a pretrained model that has been trained on a large dataset to classify land cover features accurately. By using this pretrained model, you can leverage the knowledge and expertise embedded in the model to extract the different land cover types in your study area. This saves you time and effort compared to training a model by yourself.

  8. Go to ArcGIS Living Atlas.
  9. In the search box, type High Resolution Land Cover Classification – USA and press Enter.

    ArcGIS Living Atlas search box

  10. In the result list, click High Resolution Land Cover Classification – USA to go to the model's item page.

    High Resolution Land Cover Classification – USA model

  11. On the model's item page, read the description to familiarize yourself with the model.

    The model was trained to work with imagery that has an 80 to 100 centimeters (or 0.8 to 1 meter) resolution, which means that it will best perform with input of a similar resolution.

    Model input requirements

  12. Click Download.

    Download button

    Note:

    Most web browsers download files to your computer's Downloads folder by default.

  13. Move the downloaded deep learning package to a location on your computer where you can find it easily.
  14. Press Ctrl+S to save the project.

Classify pixels using deep learning

You'll now generate a land cover layer using the Classify Pixels Using Deep Learning geoprocessing tool and the pretrained model you downloaded.

Note:

Using 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, save your project, close ArcGIS Pro and follow the steps delineated in the Get ready for deep learning in ArcGIS Pro instructions. In these instructions, you'll also learn how to check whether your computer hardware and software can run deep learning workflows and other useful tips. When you're finished, you can reopen your project and continue with the tutorial.

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

    Geoprocessing button

  2. In the Geoprocessing pane, in the search box, type Classify Pixels Using Deep Learning. In the list of results, click the Classify Pixels Using Deep Learning tool to open it.

    Searching for the Classify Pixels Using Deep Learning tool

  3. In the Classify Pixels Using Deep Learning tool, set the following parameters:
    • For Input Raster, choose Alexandra_Orthomosaic.
    • For Output Raster Dataset, type Land_Cover_Raster.
    • For Model Definition, click the Browse button.

    Classify Pixels Using Deep Learning tool parameters

  4. In the Model Definition window, browse to the HighResolutionLandCoverClassification_USA.dlpk deep learning package you downloaded. Select it and click OK.

    Model Definition window

    After a few moments, the model arguments load automatically.

  5. Under Arguments, locate the batch_size argument.

    Batch_size argument

    Deep learning pixel classification cannot be performed on the entire image at one time. Instead, the tool will split the image into small tiles, based on the tile_size argument value. A batch size of 4 means that the tool will process four image tiles at a time. As you run the tool, you may receive an error because your computer doesn't have enough memory for that level of processing. In that case, try decreasing the batch_size value from 4 to 2 or even 1. If you have a powerful computer, you could also increase the batch_size value for faster processing.

    For now, you'll keep the default value of 4, and you'll also accept the other argument default values. Next, you'll set the cell size to be used while the tool is run.

  6. Click the Environments tab.

    Environments tab

  7. Under Raster Analysis, for Cell Size, type 0.9 (that is, 0.9 meters or 90 centimeters).

    Cell Size parameter

    The original cell (or pixel) size of the drone image is 2.5 centimeters (or 0.025 meters). This is a very high resolution and would result in a large number of pixels to process and a longer processing time. Additionally, the small cell size may be too detailed for the features to be classified accurately. As you learned earlier, the model is expecting input imagery with a 80-100 centimeter cell size (or 0.8-1 meters). By adjusting the processing cell size to 0.9 meters, the imagery will be automatically resampled to that larger cell size on the fly before being used as input for deep learning classification. The resampled imagery will be much closer to the model's expectation. This will ensure a faster process and more accurate land cover classification results.

    Note:

    To gain a better understanding of how the cell size setting can impact results, see the Imagery cell size section in the Multiresolution Object Detection with Text SAM article.

  8. For Processor Type, choose GPU. For GPU ID, choose 0.

    Processor Type section

    Note:

    For this tutorial, an NVIDIA GPU with a minimum of 4 GB of dedicated memory is recommended. If you only have a CPU, the process should still work, but it will take much longer to run. In that case, choose the CPU option. To learn more about GPUs and how they are used for deep learning processes, see the Check for GPU availability section in the Get ready for deep learning in ArcGIS Pro tutorial.

  9. Accept all other default values and click Run.

    While the tool is processing, you can click View Details for more information.

    Run and View Details buttons

    Tip:

    If you get an out of memory error, try decreasing the batch_size value from 4 to 2 or even 1 and run the process again.

    After a couple of minutes, the result layer, Land_Cover_Raster, appears in the Contents pane and on the map. It is a raster layer in which each pixel value represents one of nine land cover categories.

    Alexandra_Land_Cover layer on the map

    You can see the list of land cover types in the Contents pane.

    Alexandra_Land_Cover legend

  10. Zoom in and pan around the Land_Cover_Raster layer to explore it.

    You see various land cover features such as vegetation, buildings, water bodies, and roads. This high-resolution raster provides valuable insights into the distribution and extent of these land cover types in this Alexandra township area.

    Note:

    You may notice that the vegetation areas were extracted with good overall accuracy, but the results are of lesser quality for the buildings, especially in the areas containing informal housing. Depending on the imagery resolution and the specific type of buildings present, the quality of results may vary, and it can be useful to use different methods to extract different feature types. A powerful approach to extract buildings with high accuracy is described in the Multiresolution Object Detection with Text SAM article.

  11. On the Quick Access Toolbar, click the Save Project button to save your project.

    Save Project button

Generate a land cover feature layer

Having obtained a land cover raster, depending on your goals, it can be useful to derive a polygon layer from it. This will allow you to continue your analysis workflow using any vector-based geoprocessing tools available in ArcGIS Pro. You'll do that with the Raster to Polygon tool. Then, you'll symbolize the new layer.

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

    Back button

  2. Search for and open the Raster to Polygon tool.

    Raster to Polygon tool search

  3. In the Raster to Polygon tool, set the following parameters:
    • For Input raster, choose Land_Cover_Raster.
    • For Field, choose Class.
    • For Output polygon features, type Land_Cover_Features.

    Raster to Polygon tool parameters

  4. Accept all other defaults and click Run.

    The Land_Cover_Features layer is created and added to the map.

    Land_Cover_Features layer on the map

    Note:

    The layer's color was assigned at random and may vary.

    In the new layer, the different land cover patches have been turned into polygon features. Each polygon has a land cover type assigned to it. You'll now symbolize the layer to make these land cover types visible. You could symbolize each type one by one, choosing a different color for each one. However, to expedite the workflow, you'll use a layer file with a symbology that was already set up for you.

  5. Download the Land_Cover_Symbology.lyrx layer file.
  6. In the Contents pane, confirm that the Land_Cover_Features layer is selected.

    Land_Cover_Features layer selected

  7. On the ribbon, click the Feature Layer tab. In the Drawing group, click the Symbology button.

    Symbology button

    The Symbology pane appears.

  8. In the Symbology pane, click the options button and choose Import symbology.

    Import symbology menu option

  9. In the Apply Symbology From Layer tool, set the following parameters:
    • Confirm that Input Layer is set to Land_Cover_Features.
    • For Symbology Layer, click the Browse button. Browse to the Downloads folder, select the Land_Cover_Symbology.lyrx file, and click OK.

    Apply Symbology From Layer tool parameters

    Tip:

    Optionally, you could move the Land_Cover_Symbology.lyrx file to the Alexandra_Land_Cover project folder and access it there. This would be particularly useful if you plan to reuse this symbology for other layers.

  10. Click Run.

    The Land_Cover_Features layer updates.

    Land_Cover_Features layer on the map

    The land cover types are now visible. You can refer to the layer's legend in the Contents pane for more details.

    Land_Cover_Features legend

    Note:

    The symbology proposed takes color blindness into account.

    If you prefer designing your own color scheme when working with your own data, you can explore the Unique Values symbology option in ArcGIS Pro. This allows you to select a field and manually pick colors for each attribute value, creating a customized symbology scheme for your land cover data. If you want to learn more about choosing colors for maps, see the tutorial series Choose colors for maps.

Compute the total vegetation area

You'll now identify the green spaces (or vegetation-covered areas) in this neighborhood of Alexandra and you'll compute the total surface they cover.

  1. In the Contents pane, right-click the Land_Cover_Features layer and choose Attribute Table.

    Attribute Table menu option

  2. In the Land_Cover_Features attribute table, locate the Class field.

    Class attribute

    This is where the land cover type values are stored. Two land cover types correspond to vegetation-covered areas: Low Vegetation and Tree Canopy. You'll generate a query that includes these two types.

  3. Click Select By Attributes.

    Select By Attributes button

  4. In the Select By Attributes window, under Expression, form the expression Where Class includes the value(s) Low Vegetation, Tree Canopy.

    Select By Attributes window

  5. Click OK.

    All the polygon features corresponding to vegetation are now selected on the map.

    Vegetation polygon features selected on the map

  6. In the attribute table, click the Show Selected Records button.

    Show Selected Records button

    There are 831 polygons representing vegetation.

    Note:

    You may obtain a slightly different number.

    You'll now find how much surface these 831 polygons cover altogether.

  7. Right-click the Shape_Area field and choose Explore Statistics.

    Explore Statistics menu option

    The Land_Cover_Features Data Engineering view appears. It shows various statistics about the Shape_Area attribute.

    Landcover_feature Data Engineering view

  8. Scroll horizontally and locate the Sum cell.

    Sum column

    This value corresponds to the sum of the surface area for all currently selected polygons.

    Note:

    You may obtain a slightly different number.

    You conclude that the total surface covered by green spaces in this Alexandra neighborhood is about 403,990 square meters or 0.404 square kilometers.

Create a green space layer

As a last step, you'll create a layer that contains only the green spaces in your study area, using the Export Features tool.

  1. In the Contents pane, right-click the Land_Cover_Features layer, point to Data, and choose Export Features.

    Export Features menu option

  2. In the Export Features window, set the following parameters:
    • For Input Features, confirm Land_Cover_Features is selected.
    • Confirm the Use the selected records option is on.
    • For Output Feature Class, type Green_Spaces.

    Export Features tool parameters

    With the Use the selected records option is on, only the polygon features that are currently selected will be exported to the new layer.

  3. Click OK.

    The new layer is added to the map. You'll do some cleanup to better see this new layer.

  4. Close the Land_Cover_Features Data Engineering view. Close the attribute table.

    Close button

  5. On the ribbon, click the Map tab. In the Selection group, click Clear to remove the feature selection on the Land_Cover_Features layer.

    Clear button

  6. In the Contents pane, click the Land_Cover_Features and Land_Cover_Raster check boxes to turn these layers off.

    Layers turned off

    The map now shows only the Green_Spaces layer, displayed over the original drone imagery.

    The extracted vegetated areas displayed over the original drone map

  7. Press Ctrl+S to save the project.

    You can use the Green_Spaces layer in any maps or research projects. You can also share it with your community by publishing it to ArcGIS Online as a web layer.

Apply this workflow to your own imagery (optional)

To apply this workflow to your own imagery, keep the following in mind:

  • Where to store your imagery—In this tutorial, you used an image layer that was generated in Site Scan for ArcGIS out of raw drone imagery and saved to ArcGIS Online directly from Site Scan. When working with your own data, you can similarly host it on ArcGIS Online. Another option is to use imagery that is stored on your local computer.
  • Understanding the model's data requirements—As you can read on the High Resolution Land Cover Classification – USA description page, the model expects as input 8-bit, 3-band high-resolution (80 - 100 cm) imagery.

    Model input requirements

  • Preparing your imagery—The three bands expected are red, green, and blue (or RGB). If your imagery has more than three bands, you should extract the relevant bands before proceeding with the deep learning process. The model also expects the imagery to have an 8-bit pixel depth. If your imagery has a different pixel depth, such as 16 bit, you should convert it to 8 bit. See the Select relevant imagery bands section in the Improve a deep learning model with transfer learning tutorial for step-by-step instructions on how to implement these changes.
  • Finding information about your imagery—If you are not sure what your imagery's properties are (such as number of bands, pixel depth, or cell size), in the Contents pane, right-click your imagery layer, and choose Properties. In the Properties pane, click the Source pane, and under Raster Information, find the Number of Bands, Cell Size X, Cell Size Y, and Pixel Depth values.
  • Experimenting with the cell size—As you are using the Classify Pixels Using Deep Learning geoprocessing tool, you can try several Cell Size values to see which one gives you the best result for your imagery. However, 0.9 should be a good fit for the model, since it is expecting a 80-100 centimeter cell size (or 0.8-1 meter). It is not recommended to use imagery that has a coarser cell size than what the model expects.
  • Experimenting on a small extent—While experimenting, you can limit the processing to a small extent for faster results. On the Environments tab, under Processing Extent, click the Draw Extent button, and draw a small polygon on the map.

    Draw Extent button

In this tutorial, you used a pretrained deep learning model to classify high-resolution drone imagery into land cover types at the pixel level for a neighborhood of Township of Alexandra, South Africa. You then converted the detailed land cover raster layer into a vector layer and symbolized it. You selected the polygons representing vegetation and computed the total surface area they cover. Finally, you derived a vector layer containing only the green spaces in the neighborhood.

To learn about other options to extract land cover with GeoAI, see the article Unlocking Landscapes: Landcover Mapping using Pretrained Deep Learning Models.

You can find more tutorials like these in the Try deep learning in ArcGIS series.

You can find more tutorials in the tutorial gallery.