Exercise 5: Imagery Service Layers in AGOL
Tasks:
- Exploring imagery layers in a Web Map
- Create a web app using the Image Mask configurable app
- Publish an imagery layer in ArcGIS Online
1: Exploring imagery layers in a Web Map
In this section, you will create a web map in ArcGIS Online using an imagery layer from ArcGIS Living Atlas. The imagery layer you will use in this section is called USA NAIP Imagery: Natural Color. This imagery layer is a collection of NAIP imagery acquired during different years in the US.
-
Create a new Web Map in your class AGOL account.
-
Browse the Living Atlas, searching for
NAIP
and add theUSA NAIP Natural Color
layer to your map.
-
Click anywhere on the image. A pop-up window alerts you that you’ve selected the Overview image.
Note: The image you see is the Overview image, not the source image.
-
Using the magnifying glass
, search for
9 Circuit Dr. Durham, NC, 27708
. -
Click the image. A pop-up window alerts you that you’ve selected the Primary image.
Note: The image you see now is the source image. The pop-up window also shows the source image’s information including its acquisition date.
-
With the NAIP Imagery layer selected, click the Filter button on the Settings panel to open the Filter pane.
-
Click Add Expression, set the expression to AcquisitionDate Is on 5/26/2016, and click Save.
An image with lighter color appears.
The NAIP imagery layer is published from a mosaic dataset, which manages collections of NAIP images obtained from different dates. By default, the latest images are displayed when you zoom to an area. However, you can use the filter to select earlier images.
-
Click the image. The pop-up window indicates that the image’s acquisition date is May 26, 2016.
-
On the Filter pane, click the Remove Filter button, and click Save. This removes the filter. The image acquired on July 10, 2020, appears.
Next, you will display this imagery layer using different renderers.
-
On the Settings toolbar, click the Processing Templates button to open the Processing Templates pane. The current renderer is NaturalColor.
-
Change the renderer to FalseColorComposite.
The image layer is displayed in false color where the red color highlights vegetation.
-
Change the renderer to NDVI_Color.
The image layer is rendered using NDVI_Color, and the vegetation appears in green.
-
Change the renderer back to NaturalColor, and click Done.
-
On the Contents toolbar, click the Save and Open button, and click Save As to save the changes to the map.
-
In the Save Map window, do the following:
- For Title, type
NAIP Imagery
followed by your NetID. - For Tags, type NAIP and ENV790.
- For Summary, type A web map with Living Atlas imagery layer USA NAIP Imagery: Natural Color.
- For Save in Folder, choose Tutorial 5.
- Click Save Map.
- For Title, type
In this section, you created a web map using the NAIP imagery layer from ArcGIS Living Atlas. You will use this web map in the next section to create a web app.
2: Create a web app using the Image Mask configurable app
In this section, you will use the Image Mask configurable app to create a web app that shows vegetation change in Redlands, California.
-
In the upper left, click the Menu button (three horizontal lines), and click Content.
-
Click Create App, and choose Configurable Apps. The Create a Web App pane appears.
-
Under What Do You Want to Do?, choose Show All. In the search box, type
Image Mask
. The Image Mask configurable app is found. -
Choose Image Mask, and click Create Web App.
-
On the Create a Web App pane, do the following:
- For Title, type Vegetation Change in Duke Forest. - For Tags, type NAIP, NDVI, and ENV 790.
- For Summary, type Vegetation change based on NDVI.
- For Save in Folder, choose Tutorial 5.
- Click Done.
The Image Mask app opens. You are asked to select the web map that will be used in the app.
-
Click the NAIP Imagery web map you just created, and click Select. The Configuration pane appears.
-
On the General tab, for Title, type
Vegetation Change in Duke Forest
. For Description, type This web app displaysVegetation change in Duke Forest, using Living Atlas’s NAIP imagery layer
. -
On the Options tab, check the Add the About Tool to Tell Users What Your App Does check box. Type some instructions in the text box, and click Save.
-
Check the Add a Scalebar to Your Map check box, and keep the default settings.
-
On the Imagery tab, under Choose a Default Imagery Layer, choose USA NAIP Imagery: Natural Color Imagery.
-
Under Choose an Image Masking Tool, choose Change Detection.
-
Under Give Your Tool a Name, type
Vegetation Change Detection
. -
Under Select Which Precalculated Indexes Users Can Analyze, choose Vegetation Index. Uncheck the Overall Image Brightness check box.
You will use NDVI to analyze the vegetation’s distribution.
-
Under Choose Which Layers Will Be Searchable for Specific Images, choose USA NAIP Imagery. In the expanded field list, choose AcquisitionDate.
-
Check the Show the Active Image’s Date in the App Header check box. Under Label, type
Image Acquisition Date
. -
Under Imagery Layers, click NAIP Imagery, and click AcquisitionDate in the expanded list.
-
On the Search tab, click Add the Search Tool So Users Can Search for a Location or Data in the App.
-
Click Save, and click Launch to view the app.
Now we’ll look at a place where land cover has changed…
-
In the search box, type
249 Hickory Hollow Rd, Durham, North Carolina, 27705
. Zoom out to see more of Duke Forest. -
Use the tool to explore vegetation change over time…
The change detection calculates the change between two NDVI images. You can see green and purple colors in the result. Light green represents new vegetation areas in 2016, while purple shows the areas where vegetation disappears in 2016. You can draw a polygon to focus your analysis within a specific area. You can also adjust transparency to visually check whether the change detection results match the original images.
Note: The two images used for change detection should be properly aligned. Otherwise, the results will be incorrect if there is a shift between them.
-
Close the app.
In this section, you created a web app to show the vegetation change in Redlands, California. You used an imagery layer from ArcGIS Living Atlas in your web app. You may want to publish your own imagery layers. The next section will teach you how to publish imagery layers to ArcGIS Enterprise.
3: Publish an imagery layer in ArcGIS Online and detect objects using a trained deep learning model
*In this section, you will create a dynamic imagery layer in ArcGIS Online using a 4-band high-resolution multispectral image and detect cars from the imagery layer using the Car Detection – USA model.
Download the exercise data here to your local machine.
-
Sign in to ArcGIS Online using your ENV790 account.
-
Under Content > My Content, open the Tutorial5 folder, and click New Item.
-
In the New Item window, click Imagery Layer.
The Create Imagery Layer window guides you through creating an imagery layer.
-
For layer type, uncheck Tiled Imagery Layer, and check Dynamic Imagery Layer. Click Next.
A dynamic imagery layer supports on-demand server-side processing.
-
For layer configuration, click One Image, and click Next.
This will create one simple imagery layer from a single image.
The only available raster type is Raster Dataset.
-
Click Configure Properties to view the settings. Keep the default values, and click Cancel.
-
Under Select Input Imagery, drag and drop the
ortho_petaluma.tif
(from the Chapter9 folder) into the grey area. The image uploads to ArcGIS Online. -
Click Next, and for Set Item Details, do the following:
- For Title, type Ortho Petaluma Dynamic Imagery
. - For *Tags*, type `Imagery Layer` and `ENV790`. - For Summary, type
A dynamic imagery layer created from a high-resolution image
. - For Save in Folder, choose
Tutorial5
. - Click Create.
The progress of the layer creation is shown, including uploading files and creating the imagery layer item.
- For Title, type Ortho Petaluma Dynamic Imagery
-
After the imagery layer is successfully published, open it in Map Viewer.
►Next, you will create an imagery layer to show the distribution of vegetation using a raster function template from ArcGIS Online.
-
Click Analysis > Raster Analysis. On the Raster Analysis pane, click Browse Raster Function Templates.
-
In the Custom Analysis Tools and Raster Functions window, choose ArcGIS Online from the drop-down list. In the search box, type
NDVI Colorized
and select that one. (Be sure it’s the one with “Colorized” in the name.) -
Click Select.
-
On the NDVI-Colorized pane, for Raster, select the image layer you uploaded earlier in this tutorial. For Result Layer Name, choose
Ortho Petaluma NDVI Colorized
. Uncheck Use Current Map Extent.
-
Click Show credits. A credit usage report says that one (1) credit is required for this process.
-
Click Run Analysis. When the processing completes, the Ortho Petaluma NDVI Colorized tiled imagery layer is added to the map, showing vegetation in green.
-
On the Contents pane, uncheck
Ortho Petaluma NDVI Colorized
layer.
► Next, you will use a trained deep learning model from ArcGIS Living Atlas to detect cars from the Ortho Petaluma Dynamic Imagery layer.
-
On the imagery layer, zoom to the lower right so that you can detect cars from this area.
-
Click Analysis > Raster Analysis. On the Raster Analysis pane, expand the Deep Learning toolset, and click the Detect Objects Using Deep Learning tool.
The Detect Objects Using Deep Learning tool runs a trained deep learning model on an imagery layer to create a feature layer containing the objects it finds.
-
On the Detect Objects Using Deep Learning pane, for Choose Image Used to Detect Objects, choose Ortho Petaluma Dynamic Imagery.
-
From the Choose Deep Learning Model Used to Detect Object drop-down list, click Choose Deep Learning Model. In the Choose Deep Learning Model window, in the search box, change the location to Living Atlas.
-
Search for
Car Detection – USA
, and click Select.The tool starts querying the deep learning model arguments and populates their values. You can keep these values.
-
For Result Layer Name, type
Ortho Petaluma cars
. For Save Result In, chooseTutorial5
.
➡️ The Use Current Map Extent check box is checked, so the tool will process only the imagery layer within the current map extent.
-
Click Show Credits. A credit usage report says that one (1) credit is required for this process.
-
Click Run Analysis. After the tool runs, the Ortho Petaluma Cars feature layer is added to the map.
-
On the Contents pane, point to the Ortho Petaluma cars layer, click the Change Style button to open the Change Style pane, and click Options.
-
On the Change Style pane, click Symbols. Set the fill to No Color, click Outline, choose red, and click OK.
-
Click OK, and click Done.
Cars are outlined in red, and most cars are correctly detected.
-
Click Save > Save. On the Save Map page, for Title, type
Petaluma Web Map
. For Tags, typeNDVI
andENV790
. For Summary, typeA web map of an orthoimagery layer, colorized NDVI imagery layer, and detected cars using deep learning
. Browse to the Chapter 9 folder, and click Save Map.
In this section, you published your image in ArcGIS Online. You used an online raster function template to create an imagery layer to show the distribution of vegetation. You also used a trained deep learning model to detect cars from the imagery layer.
Note: Imagery layer styling and analysis were not fully supported in Map Viewer in ArcGIS Online at the time this edition was in production.
In this tutorial, you learned that imagery layers are used not only as a basemap but also for analysis. Raster functions are useful for quick online analysis. You learned how to use imagery layers from ArcGIS Living Atlas to create an app to analyze vegetation change. You also learned how to publish your own imagery layers to ArcGIS Enterprise or in ArcGIS Online, and to perform analyses.
Questions and answers
-
To publish imagery layers, does ArcGIS Server need to be licensed with an image server role?
Answer: You can still publish raster datasets or raster layers as imagery layers without an image server license role. However, you will need it to publish mosaic datasets or raster layers with mosaic function as imagery layers.
-
When publishing an imagery layer, I chose Reference Registered Data. Why did I receive a warning that said: “24011 Data source is not registered with the server and data will be copied to the server”?
Answer: This warning indicates that the folder containing the image data has not been registered to the server. In ArcGIS Server Manager, browse to Site > Data Store, click the drop-down list for Register, and choose the Folder option. Specify the folder in which your image data is stored and make sure ArcGIS Server has permission to access the folder.
-
I wanted to publish an imagery layer in ArcGIS Online, but could not find the option to create an imagery layer in the New Item window. Why?
Answer: If you do not see the option to create imagery layers, you may not be granted the necessary user type, role, and license. To create and analyze imagery layers, you must have the following: User type: Creator, GIS Basic, GIS Standard, or GIS Advanced Role: Publisher, Facilitator, or Administrator License: ArcGIS Image for ArcGIS Online
-
I published a NAIP image in ArcGIS Online and wanted to detect buildings from the imagery layer using the Detect Objects Using Deep Learning tool. The model I chose is Building Footprint Extraction – USA deep learning package (from ArcGIS Online). The tool failed and returned errors. Why?
Answer: A high-resolution image (0.1–0.4 m) is required for detecting buildings using the trained deep learning model Building Footprint Extraction – USA. The NAIP image’s resolution (1 m or 0.6 m) is lower. You will need to find a high-resolution image for building detection.