Create imagery layers and add them to a web map
To assess the hail damage in the cornfields of the Taber and Barnwell area, you will use satellite imagery. The scenario is that you have that imagery on your local computer and would like to perform your analysis in ArcGIS Enterprise. After having obtained the imagery, you'll create online imagery layers, display the layers in a web map, change their band combination, and examine them visually.
Note:
Throughout this tutorial, you may see images that show Tiled Imagery Layers (Hosted). This data type is only available in ArcGIS Online. If you are an ArcGIS Enterprise user, you'll see Imagery Layer (Hosted) instead. This is expected and will not impact your ability to complete the tutorial.
Download the imagery
First, you'll download a file containing that imagery, so that you have it on your local computer.
- Download the compressed Corn_Fields_Imagery.zip file.
- Locate the downloaded Corn_Fields_Imagery.zip file on your computer.
Note:
Most web browsers download to your computer's Downloads folder by default.
- Right-click the Corn_Fields_Imagery.zip file and extract it to a location you can easily find, such as your Documents folder.
- Open the extracted Corn_Fields_Imagery folder to inspect it.
The folder contains two georeferenced TIFF images, Before_Storm.tif and After_Storm.tif, along with their auxiliary files. The images were captured on August 4 and August 8, 2019, before and after the hailstorm in the Taber and Barnwell area.

Note:
A georeferenced TIFF image includes several auxiliary files (.tfw, .tif.aux.xml, and .tif.xml), which provide information about the coordinate system used and other elements useful to display the image properly.
The two images are PlanetScope satellite imagery produced by the Earth-imaging company, Planet Labs. PlanetScope is a constellation of 120 satellites that enables the capture of new images every day for any area on Earth.
Below is a quick preview of the images: Before_Storm.tif on the left and After_Storm.tif on the right.

You'll visualize them by yourself later in the tutorial.
In this section, you downloaded imagery so that you have it on your desktop. You are now ready to start the actual workflow.
Create imagery layers
You will now upload the two images to ArcGIS Enterprise, creating online imagery layers.
- Open your ArcGIS Enterprise portal. On the top bar, click Sign In and sign in using you ArcGIS Enterprise account.
- On the top ribbon, click Content.

- Click New item.

- In the New item window, click Imagery layer.

- For Choose a layer configuration based on your imagery, click Multiple Imagery Layers.

Note:
This option allows you to upload several images in a single batch, creating one layer for each image.
- Click Next. For Select input imagery, click Browse. In the Open window, browse to the downloaded Corn_Fields_Imagery folder. Press Ctrl+A to select all the files listed and click Open.

The files start uploading. You can monitor the progress in the Upload status column.

When all files show as 100% uploaded, you'll define a title template.
Since you are uploading more than one image at once, you can define a common prefix and suffix that will be applied to the titles of all images in the batch. This can be useful to make the images easily recognizable and retrievable in your ArcGIS Enterprise account.
- When all files show as 100%, click Next. For Title, click Define titles.

- In the Define the title template for imagery layers window, in the Prefix field, type Corn_Fields_.
You'll also add a suffix that contains your initials.
Note:
As you create any new imagery or feature class layer in ArcGIS Enterprise, you must ensure that its name is unique across your organization. In this tutorial, you'll do that by adding your initials at the end of every new layer. The tutorial will use YN as an example (the initials for Your Name). However, you should adapt this to your own name. For instance, if your name is Jane Smith, your initials will be JS.
- In the Suffix field, type _YN . Click Apply.

All the images uploaded will have the same prefix and suffix, for instance, Corn_Fields_Before_Storm_YN.
- Enter the remaining information about the images:
- For Tags, type Agriculture, Imagery, Damage assessment, press Tab after each.
- For Summary, type Imagery for the Taber-Barnwell, Alberta region.
- For Save in folder, accept the default location or choose a folder of your choice in your ArcGIS Enterprise account.

- Click Create.
The process completes.
- On the ribbon, click Content.
- Under Folders, if necessary, click All my content or the specific folder where you chose to store the imagery.

At the top of the content list, the two image layers appear.

In this section, you created two hosted imagery layers. Next, you'll create a web map and display the two imagery layers in it.
Create a web map with imagery layers
You will now create a web map and add the two imagery layers to it. Then, you'll explore the two layers visually.
- On the ribbon, click Map.

An empty map appears with the Layers tab open so you can add layers. For now, the map contains only the Topographic basemap layer. You'll add the imagery layers that you uploaded.
- In the Layers pane, click the Add button.

Bu default, when you click the Add button, you'll add from My content.
Note:
If you click the drop-down arrow, you'll see other options to add to the map.
- In the search bar, type Corn_Fields and press Enter.
The two imagery layers you created appear in the result list.

- In the result list, for Corn_Fields_Before_Storm_YN, click Add.

The layer is added to the map, even though you can't see it yet because you are too zoomed out. You'll add the second layer, then you'll zoom in.
- In the list of results, for Corn_Fields_After_Storm_YN, click Add.
- Click Back to go back to the Layers pane.

In the Layers pane, the two imagery layers are now listed.

Next, you will rename the layers to remove the underscores and your initials.
- For the Corn_Fields_After_Storm_YN layer, click the Options button and choose Rename.

- In the box that appears, edit the name to be Corn Fields After Storm and click OK.

- Similarly, rename the Corn_Fields_Before_Storm_YN layer to Corn Fields Before Storm.

Both layers are renamed. In the remainder of this tutorial, the need for making every layer unique with YN-style initials and the possibility of renaming them for a cleaner look will not be mentioned again. However, these principles still apply for any new layer generated.
Note:
Within a web map, all the layers can be renamed as you wish, without consequences for the underlying data.
- Point to Corn Fields Before Storm, click More options, and choose Zoom to.

The map zooms in to the Taber-Barnwell region extent. The top imagery layer, Corn Fields After Storm, is visible.

Next, you'll compare the imagery layers.
- In the Layers pane, point to the Corn Fields After Storm layer. Click the Visibility button to turn it off and compare the layers.

On the Corn Fields Before Storm image, you can see many fields; many are circular in shape, and others rectangular. The fields tend to be bright or dark green, because in August, before the storm, many crops are getting close to maturity.

At first glance, the Corn Fields After Storm image has some lighter tones in some areas. In particular, there are light-tone traces crossing the image in the northwest to southeast axis. However, it is difficult to gather more precise information about crop damage at this point.
In this section, you created a web map and added the two imagery layers to it. Then, you explored the two layers visually.
Change the band combination to natural color
You will now improve the image display and save the map.
Before diving deeper into the analysis, you need to better understand what you are looking at and make some changes to the image display. The two images are multispectral, which means that they contain several separate spectral bands:
- Blue (Band_1)
- Green (Band_2)
- Red (Band_3)
- Near Infrared (Band_4)
Note:
Near Infrared light is not visible to the human eye, but it is often captured by satellite and aerial imagery sensors. It is useful for many applications, as you'll see later in the tutorial.
The bands can be combined in various ways and displayed through the red, green, and blue channels to generate a composite image. Currently, the bands are assigned to the RGB channels in a default order:
- Red: Band_1 or blue
- Green: Band_2 or green
- Blue: Band_3 or red
- The near infrared band (Band_4) is not displayed.
This order is not particularly helpful, and you want to change it to form natural color composite images that will approximate how colors would look to a person. For instance, the bare soil areas that currently appear in blue-gray tones will change to more natural brown tones.

You'll start with the Corn Fields Before Storm image.
- In the Layers pane, ensure that the Corn Fields After Storm layer is off and that the Corn Fields Before Storm layer is turned on.
- Click the Corn Fields Before Storm layer to select it.

When a layer is selected, a blue line appears next to its name.
- On the Settings (light) toolbar, click Styles.

Note:
Each side toolbar can be collapsed or expanded using the buttons on the bottom of each. If you don't see the full names of the options on the toolbars, you can expand them.
- In the Style pane, under Select Style, under RGB, select Style options.

- In the Style options pane, under RGB, choose the following values:
- For Red, choose Band_3.
- For Green, confirm that Band_2 is selected.
- For Blue, choose Band_1.

This new band combination will display the red band through the red channel, the green band through the green channel, and the blue band through the blue channel.
- For Stretch type, click the drop-down arrow and choose Percent clip.

- Click Done twice.

The Corn Fields Before Storm image updates to a natural color display. Most strikingly, the bare soil is now brown.
Similarly, you'll update the Corn Fields After Storm display.
- In the Layers pane, turn on Corn Fields After Storm layer and select it.
- In the Style pane, for RGB, click Style options.
- In the Style options pane, do the following:
- For Red, choose Band_3.
- For Green, confirm that Band_2 is selected.
- For Blue, choose Band_1.
- Change the Stretch type to Percent clip.
You will now return to inspecting the before and after imagery, looking at them in the natural color combination.
- In the Layers pane, toggle the visibility for both layers and observe the differences between the them.
Next, you'll save the map.
- On the Contents (dark) toolbar, click Save and open and choose Save as.

- In the Save map window, enter the following:
- For Title, type Hail Damage in corn fields.
- For Tags, type Agriculture, Imagery, Damage assessment and press Enter.
- For Summary, type Assessment of the damage caused by a hail storm to corn fields in the Taber - Barnwell region. or a more detailed summary of your choice.
- For Save in folder, accept the default or choose a folder of your choice.

- Click Save.
In this module, you created online imagery layers, displayed them in a web map, changed their band combination, and examined them visually.
Perform change analysis with the SAVI index
In this module, you will perform change analysis to assess the damage caused by the hailstorm. You'll apply the SAVI index to the pre- and post-storm images to detect the presence of vegetation and measure its health. Then, you'll compute the difference between the two SAVI layers to learn how much healthy vegetation was lost. Finally, you'll extract the average loss of healthy vegetation in each cultivated field.
But first, you'll learn how the red and near infrared bands can help assess vegetation health.
Learn about vegetation health and light reflection
To detect the presence of vegetation and assess its health, you can use the red and near infrared (NIR) bands of a multispectral image.
- The chlorophyll in healthy vegetation absorbs most of the light in the red band for use in photosynthesis, therefore reflecting very little of it.
- The cell structure of healthy vegetation strongly reflects NIR light.
Since the satellite sensor captures the amount of reflected light in the different bands, the values of an image pixel showing healthy vegetation will typically be low for the red band and high for the NIR band. This is illustrated in the spectral profile graph below. In contrast, stressed or dying vegetation will absorb less red light (therefore reflecting more of it) and will reflect less NIR light. The graph also shows that a pixel representing bare soil would reflect even more red light and less NIR light.

By measuring the ratio between NIR and red bands in a satellite image for each pixel, you can detect the presence of vegetation on the ground and measure its health. This is what you'll do with the SAVI index.
Note:
This type of analysis is performed at the pixel or cell level.
Satellite TIFF images, such as the ones you are using in this tutorial, are rasters. A raster is data that is represented as a grid of cells or pixels.

When doing raster-based analysis, you compute values for every cell in the raster. Learn more about raster data.
Apply the SAVI index
You will use the Soil-Adjusted Vegetation Index (SAVI), which measures the gap between the NIR and red bands, to assess vegetation health in the pre- and post-storm images.
Note:
A spectral index combines different spectral bands through a mathematical formula, usually computing some type of ratio. The resulting output is a new raster layer.
A higher SAVI value indicates a higher presence of healthy vegetation. Here is the formula that SAVI uses:
SAVI = ((NIR - Red) / (NIR + Red + L)) * (1 + L)
Note:
SAVI is an improvement over the more classic NDVI index.
The factor L in the formula is added to minimize the influence of soil brightness variation, with a default of 0.5 for value. The final SAVI value varies from -1.5 to +1.5 (when L=0.5).
In ArcGIS Enterprise, you can compute SAVI using Band Arithmetic, one of more than 150 raster functions provided.
You'll first apply SAVI to the Corn Fields Before Storm layer using the Band Arithmetic raster function.
- On the Settings toolbar, click Analysis.

- In the Analysis pane, click the Raster Functions button.

You'll search for and run the Band Arithmetic raster function.
- In the Raster Functions pane, in the search bar, type band and press Enter. In the list of results, click the Band Arithmetic tool to open it.

- In the Band Arithmetic raster function pane, set the following parameter values:
- For Raster, choose Corn Fields Before Storm.
- For Method, choose SAVI.
- For Band Indexes, type 4 3 0.5.
- For Output name, type SAVI Before.
- For Save in folder, choose a folder or keep the default.
Note:
For the Band Indexes parameter, typing 4 3 0.5 indicates that the SAVI formula should use the Band 4 and Band 3 in your image, which are the near infrared and red bands, as well as a 0.5 value for the soil-brightness correction factor.

Note:
If you'd like to see the result before running the analysis, you can click Show preview to see it. Otherwise, you can run the tool to create the result.
- Click Run.
After few seconds, the message Band Arithmetic submitted appears and when the tool finishes, the result layer is added to the map.
- On the map, review the SAVI Before layer.

The white and light gray areas represent healthy vegetation. The darker areas represent unhealthy or dead vegetation, or barren land.
Note:
Unlike the original satellite image, the SAVI raster layer is not multiband. Each raster cell holds exactly one numeric SAVI value that measures the healthy vegetation status at this location.
Similarly, you'll apply SAVI to Corn Fields After Storm.
- In the Band Arithmetic pane, modify the following parameters:
- For Raster, choose Corn Fields After Storm.
- For Output name, type SAVI After.

You'll leave the Method and Band Indexes parameters the same.
- Click Run.
After some time, the result layer appears in the Layers pane and on the map. Next, you'll compare the two SAVI layers.
- In the Contents pane, turn the SAVI After layer on and off to compare it to the SAVI Before layer.

More fields are represented in darker tones after the storm than before, which means that they have lower SAVI values and less healthy vegetation. However, it is still difficult to see whether some fields were more affected than others by the storm. Next, you'll compute the difference between the two SAVI layers to measure the change in vegetation more precisely.
- On the Contents toolbar, click Save and open and click Save.
In this section, you applied the SAVI vegetation index to the before and after images to measure vegetation health in each one.
Compute the change between the two SAVI layers
You now want to measure the change in vegetation health caused by the storm. You'll compute the difference between the two SAVI layers using the Compute Change raster function. For each raster cell, the SAVI value in SAVI After will be subtracted from the value in SAVI Before. A resulting positive value will signify a loss of healthy vegetation.
- In the Band Arithmetic pane, click the Back arrow.

Note:
If you were in the History pane, you should first click the Raster Functions tab.
- In the Raster Functions pane, in the search bar, type compute. In the list of results, click the Compute Change function to open it.

- In the Compute Change raster function pane, set the following parameter values:
- For From Raster, choose SAVI_Before.
- For To Raster, choose SAVI_After.
- For Compute Change Method, confirm that Difference is selected.
- For Output name, type Loss of healthy vegetation.
- For Save in folder, choose a folder or keep the default.

- Click Run.
After some time, the result layer appears in the Layers pane and on the map.
- On the map, observe the new layer.

The white and light gray tones indicate a loss of healthy vegetation (positive numeric values). A visual inspection indicates quite clearly that the hailstorm crossed this area diagonally in the northwest to southeast axis, damaging the most fields in that diagonal area. The fields in the upper right and lower left side of the image appear much less affected.
Note:
Some areas have small negative numeric values, which seem to indicate small gains in vegetation. Since only four days separate the two images, it is unlikely that much agricultural vegetation growth occurred during that time. However, it is possible that some bare soil areas, which were dry because of the August weather, started growing weeds quickly after they got soaked with rain and melted hail during the storm.
The small gains in vegetation are not relevant to the analysis of crop damage, so you'll eliminate all the values that are below 0 in the raster. You'll do that in the next section.
- Save the map.
Clean up the result raster and symbolize it
You will clean up the Loss of healthy vegetation raster to eliminate any negative values that indicate small gains in vegetation. You'll do that with the Remap raster function. Then, you'll change the raster's symbology to better see the results.
- In the Compute Change pane, click the Back arrow.
- In the Raster Functions pane, search for and open the Remap raster function.

- In the Remap raster function pane, for Raster, choose Loss of healthy vegetation.
You'll express with a remap rule that all positive values in the raster should be changed to NoData. To make sure you capture all negative values, you'll use 2 as the maximum value.
- In the first line of the value table, set the following parameter values:
- In the Maximum column, type 2.
- Check the NoData box.

Any raster cell values between 0 and 2 will be changed to NoData.
- For Output name, type Loss of healthy vegetation cleaned
- Click Run.
After some time, the new result layer appears in the Layers pane and on the map. You'll change its style to better see the results.
- In the Layers pane, turn off all layers except for Loss of healthy vegetation cleaned. If necessary, click Loss of healthy vegetation cleaned to select it.

- On the Settings toolbar, click Styles.

- In the Style pane, under Select Style, under Stretch, select Style options.

- On the Style options pane, under Color scheme, click the current color scheme.

- In the Color scheme window, click the current color scheme.
- In the Ramp window, scroll down and choose the Blue Bright color scheme.

You want the lower values to be the darkest, to highlight areas with greater vegetation loss, so you'll flip the ramp colors.
- Click Flip ramp colors, click Done, and close the Color scheme window.

You want the colors to appear a bit darker for better visibility, so you will lower the Gamma value.
- In the Style options pane, for Gamma, use the slider to choose the value 0.6.

Note:
Learn more about styling options on the Style imagery in Map Viewer page.
- In the Style options pane, click Done, and in the Style pane, click Done.
On the map, the layer has updated to its new style.

The deep shades of purple indicate the deeper loss of healthy vegetation, the lighter shades of purple indicate limited loss of healthy vegetation, and the empty areas indicate no loss of healthy vegetation.
- Save the map.
In this section, you cleaned up the Loss of healthy vegetation raster to eliminate any irrelevant negative values. Then, you changed the resulting raster's symbology to better see the results.
Extract the average vegetation loss for each field
In the last part of this analysis, you will compute the average loss of healthy vegetation in each cultivated field. To do so, you'll first add the Taber field boundaries feature class to the map. It contains the boundaries of all the cultivated fields in the area, represented as polygons. Such a layer would be maintained by the farmer organization you work for.
- In the Layers pane, click the Add button. In the Add layer pane, click the down arrow next to My Content and choose ArcGIS Online.

- In the search bar, type or copy and paste Taber field boundaries owner:Esri_Tutorials. In the result list, for Taber field boundaries, click Add.

The field boundaries appear on the map, symbolized in red.

- In the Add layer pane, click the Back button.
You'll now compute the average loss of healthy vegetation in each field, using the Zonal Statistics As Table raster function. For each Taber field boundaries polygon, the tool will calculate the mean value of all the Loss of healthy vegetation cells that fall within that polygon.
- On the Settings toolbar, click Analysis.
- In the Analysis pane, click Tools.

- In the Tools pane, click Zonal Statistics as Table.

- In Zonal Statistics as Table pane, under Input layers choose the following parameter values:
- For Input zone raster or features, choose Taber field boundaries.
- For Zone field, choose Field_ID.
- For Input value raster, choose Loss of healthy vegetation cleaned.

- Choose the following additional parameter values:
- Under Statistical analysis settings, for Statistic type, choose Mean.
- Under Result layer, for Output table name, type Vegetation loss table.
- Click Run.
Note:
Remember that you can check the History pane to check the status of the process.
The result will be a stand-alone table, not a layer. After the process is complete, the Vegetation loss table opens. It contains one row for each cultivated field polygon. The Mean column provides the mean of healthy vegetation loss for each polygon.

Note:
You can also retrieve the table by going to the Contents toolbar, and clicking Tables and Vegetation loss table.
You now must join this table back to the Table field boundaries layer using the common Field_ID and output the result as a new layer named Vegetation loss per field.
- Close the Vegetation loss table.
- In the Zonal Statistics as Table pane, click the Back button. In the Tools pane, click Join Features.

- In the Join Features pane, under Input features, set the following parameter values:
- For Target layer, choose Taber field boundaries.
- For Join layer, choose Vegetation loss table.

- Under Join settings, choose the following parameter values:
- For Target field, choose Field_ID.
- For Join field, choose Field_ID.

- Under Result layer, for Output name, type Vegetation loss per field and click Run.
- After the process is complete, if necessary, on the Contents toolbar, click Layers to switch back to the Layers pane.

On the Layers pane, the new Vegetation loss per field is now listed. It now contains the Mean vegetation loss value for each cultivated field.

In this section, you added to your map a feature class representing the boundaries of the cultivated fields. Then you computed the average loss of healthy vegetation in each field.
Symbolize and explore the final results
You will now symbolize the Vegetation loss per field layer based on that Mean value, using a graduated colors scheme. Then, you'll observe the final map.
- In the Layers pane, click Vegetation loss per field to select it. On the Settings toolbar, click Styles.
- In the Styles pane, under Choose attributes, click Field.

- In the Select fields window, check the box next to Mean to select it, and click Add.

- Under Pick a style, for Counts and Amounts (Color), click Style options.

- Under Counts and Amounts (Color), under Symbol style, click the current color ramp to edit it.
The Symbol style window appears.
- In the Symbol style window, under Colors, click the current color ramp. On the Ramp window, scroll down, choose the Orange 4 color ramp and click Done.

- In the Symbol style pane, under Outline color, click the Edit button. In the Select color window, for #, type 5c5c5c and click Done.

- In the Symbol style pane, for Outline transparency, set the Transparency slider to 0%.

- Close the Symbol style pane.
You want the lower values to be the darkest, to highlight the fields with greater vegetation loss, so you'll flip the ramp colors.
- In the Counts and Amounts (color) pane, under Data range, click the Flip ramp colors button.

- Click Done. Click Done again.
- In the Layers pane, turn off all the layers except Vegetation loss per field.

The map shows the average vegetation loss per field, the most affected fields appearing in dark red.
- Save the map.
An optional next step would be to share the map you created with the farming community and other stakeholders.
- Choose the sharing options of your liking and click Done.
Note:
Going further, you could integrate this web map into a Field Operations application such as ArcGIS QuickCapture or ArcGIS Collector. This would allow inspectors on the ground to interact directly with the map on their mobile devices, and update it with their findings in real time. You can see an example of a similar workflow in the tutorial Inspect hydrants.
In this module, you applied a series of raster functions and feature analysis tools to perform change analysis and assess the damage caused by the hailstorm.

