Create online tiled 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. In this scenario, you have that imagery on your local computer and want to perform your analysis in ArcGIS Online. After having obtained the imagery, you'll create online tiled imagery layers, display the layers in a web map, change their band combination, and examine them visually.
Download the imagery
First, you'll download a compressed file containing that imagery, so that you have it on your local computer.
- Download the compressed Corn_Fields_Imagery_data.zip file.
- Locate the downloaded Corn_Fields_Imagery_data.zip file on your computer.
Note:
Most web browsers download to your computer's Downloads folder by default.
- Right-click the Corn_Fields_Imagery_data.zip file and extract it to a location you can easily find, such as your Documents folder.
- Open the extracted Corn_Fields_Imagery_data 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: the first image is Before_Storm.tif and the second image is After_Storm.tif.
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 online tiled imagery layers
You will now upload the two images to ArcGIS Online, creating online tiled imagery layers.
- Sign in to your ArcGIS organizational account.
Note:
If you don't have an organizational account, see options for software access.
- On the top ribbon, click Content.
- Click New item.
- In the New item window, click Imagery layer.
- In the Get started window, ensure that Tiled Imagery Layer is selected.
Note:
To learn more about the various types of online imagery layers supported by ArcGIS Online, see Your Guide to Sharing Imagery & Raster Data.
- Click Next. For Choose a layer configuration based on your imagery, choose 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_data 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 percent 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 Online account.
- 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 Online, you must make sure 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 and press Enter.
- 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 Online account.
- Click Create.
The process completes.
- 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 online tiled imagery layers. Next, you'll create a web map and display the two imagery layers in it.
Create a web map with tiled 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.
Note:
Depending on your organizational and user settings, you may have opened Map Viewer Classic. ArcGIS Online offers two map viewers for viewing, using, and creating maps. For more information on the map viewers available and which to use, please see this FAQ.
This tutorial uses Map Viewer.
- If necessary, on the top toolbar, click Open in Map Viewer.
A new map opens in Map Viewer.
For now, the map contains only the Topographic basemap layer. You'll add the two imagery layers.
- In the Layers pane, click the Add button.
- In the Add layer pane, verify that My Content is selected. 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 appears on the map.
- In the result list, for Corn_Fields_After_Storm_YN, click Add.
- Click the Back button to go back to the Layers pane.
In the Layers pane, the two imagery layers are now listed.
Tip:
Optionally, you can rename the layers and remove your initials (such as YN) for a cleaner look. Click the Options button and choose Rename.
Within a web map, the layers can be renamed without consequences for the underlying data.
In the remainder of this tutorial, the need to make every layer unique with YN-style initials won’t be mentioned again, but it will still apply for any new layer generated.
On the map, the top imagery layer, Corn_Fields_After_Storm, is visible.
You'll now compare both images.
- In the Layers pane, next to Corn_Fields_After_Storm, turn on and off the Visibility button. On the map, observe how the two image layers differ.
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.
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 Folder, accept the default or choose a folder.
- 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.
- Click Save.
In this section, you created a web map and added the two imagery layers to it. Then, you explored the two layers visually and saved the map.
Change the band combination to natural color
You will now improve the image display.
Before diving deeper into the analysis, you must 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, next to Corn_Fields_After_Storm, click the Visibility button to turn the layer off. Make sure the Corn_Fields_Before_Storm layer is turned on, and click it once to select it.
The blue bar on the layer indicates that the layer is selected.
- On the Settings (light) toolbar, click Styles.
- 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, verify 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.
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 the Corn_Fields_After_Storm layer and select it.
- In the Style pane, under RGB, select Style options.
- In the Style options pane, under RGB, choose the following values:
- For Red, choose Band_3.
- For Green, verify that Band_2 is selected.
- For Blue, choose Band_1.
- In the Style options pane, click Done. Click Done again.
You can now return to inspecting the before and after imagery, looking at them in the natural color combination.
- In the Layers pane, next to Corn_Fields_After_Storm, turn the Visibility button on and off. On the map, observe how the two image layers differ.
- Click Save and open and Save.
In this module, you created online tiled 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 Soil-Adjusted Vegetation Index (SAVI) 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 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:
The factor L in the SAVI 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 Online, 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 Raster Functions.
- In the Raster Functions pane, in the search bar, type Band Arithmetic 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 Result type, verify that Tile imagery layer is selected.
- 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.
Next, you'll check the number of credits that this analysis will consume.
- In the Band Arithmetic tool pane, click Estimate credits.
It is estimated that one credit will be consumed.
- Click Run.
After some time, the new result layer appears in the Layers pane and on the map.
- On the map, review the new 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.
You will now apply SAVI to Corn_Fields_After_Storm by modifying the Band Arithmetic parameter values.
- In the Band Arithmetic pane, for Raster, choose Corn_Fields_After_Storm. For Output name, type SAVI After.
- Accept the other parameter values and click Run.
After some time, the new result layer appears in the Layers pane and on the map.
You'll compare the two SAVI layers.
- In the Layers 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.
- Save the map.
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 button.
- In the Raster Functions pane, in the search bar, type Compute Change and press Enter. In the list of results, click the Compute Change tool 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, verify that Difference is selected.
- For Output name, type Loss of healthy vegetation.
- For Save in folder, choose a folder or keep the default.
- Accept the other default values and click Estimate credits.
It is estimated that one credit will be consumed.
- Click Run.
After some time, the new result layer appears in the Layers pane and on the map.
- On the map, observe the new layer.
The black and dark gray tones indicate a loss of healthy vegetation (negative 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 positive 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 your analysis of crop damage, so you'll eliminate all the values that are above 0 in the raster. You'll do that in the next section.
Clean up the result raster and style it
You will clean up the Loss of healthy vegetation raster to eliminate any positive values that indicate small gains in vegetation. You'll do that with the Remap raster function. Then, you'll change the raster's style to better see the results.
- In the Compute Change pane, click the Back button.
- 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 0. To make sure you capture all negative values, you'll use 2 as the maximum value.
- In the value table, in the Maximum column, click the 0 cell. Type 2 and press Enter.
- In the first row of the table, check the NoData box.
Any raster cell values between 0 and 2 will be changed to NoData.
- Enter the remaining parameter values:
- For Output name, type Loss of healthy vegetation cleaned.
- For Save in folder, choose a folder or keep the default.
- Click Estimate credits.
It is estimated that one credit will be consumed.
- 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.
- In the Style options pane, set the following parameter values:
- For Stretch type, check that Percent clip is selected.
- For Min, type 1.
- For Max, type 1.
- For Gamma, use the slider to choose the value 0.7.
- For Color scheme, click the Edit button.
- In the Color scheme window, click the Edit button.
- In the Ramp window, scroll down and choose the Blue Bright color scheme.
- Click Done, and close the Color scheme window. In the Style options pane, click Done. 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 positive values. Then, you changed the resulting raster's style 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 Taber field boundaries owner:Learn_ArcGIS. 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 Remap raster function 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.
- For Save in folder, choose a folder or keep the default.
- Accept all the other default values and click Estimate credits.
It is estimated that 1.98 credits will be consumed.
- Click Run.
The result will be a stand-alone table, not a layer. You’ll open the Table pane.
- On the Contents toolbar, click Tables.
After some time, the new result table appears in the Tables pane. You'll take a look at the table's content.
- In the Tables pane, click Vegetation loss table to select it.
The table opens. It contains one row for each cultivated field polygon. The Mean column provides the mean of healthy vegetation loss for each polygon.
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 pane.
- 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, choose the following parameter values:
- For Output name, type Vegetation loss per field.
- For Save in folder, choose a folder or keep the default.
- Accept all the other default values and click Estimate credits.
It is estimated that 0.635 credits will be consumed.
- Click Run.
- On the Contents toolbar, click Layers to switch back to the Layers pane.
After some time, the new result layer appears. 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.
Style and explore the final results
You will now symbolize the 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), for Symbol style, click the Edit button.
- In the Symbol style pane, for Fill color, click the Edit button. On the Ramp window, scroll down, choose the Orange 4 color ramp and click Done.
- In the Symbol style pane, for 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.
- 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.
The fields that appear to have experienced the highest loss are clearly concentrated in the same northwest to southeast axis observed before. The fields with the lowest loss are mostly concentrated in the upper right and lower left corners. You may observe some neighboring fields with different damage levels. This could have many causes. For instance, different crop types could be affected differently by a hailstorm. Also, two fields with the exact same crop, but each at a different level of plant maturity, could also be affected differently.
The map provides a first assessment of the damage caused by the hailstorm. It could be used to guide a more detailed inspection on the ground.
Access the analysis history.
Finally, you will look at the history for your entire analysis.
- On the Settings toolbar, click Analysis.
- In the Analysis pane, click History.
All the steps of the analysis you just performed are listed. You can view detailed information about each analysis run and reopen the analysis with the same settings you previously used. You can use analysis history to troubleshoot errors, reopen tools and raster functions with the settings used in a previous run, and document or share your analysis workflow. The analysis history is visible to users who view a shared web map.
- Save the map.
An optional next step would be to change the sharing permissions on the map you created, so that you could share it with the farming community and other stakeholders.
- Optionally, on the Contents toolbar, click Share map.
- Choose the sharing options of your liking and close the window.
Note:
Going further, you could integrate this web map into a Field Operations application. 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 Inspect hydrants tutorial.
In this tutorial, you created two online tiled imagery layers, displayed the layers in a web map, changed their band combination, and examined them visually. You then performed a change analysis on the imagery using several raster functions and tools and obtained the average loss of healthy vegetation per field. This enabled you to assess the damage caused by the hailstorm. Finally, you learned how to access the analysis history.
You can find more tutorials on the Introduction to Imagery & Remote Sensing page.