ArcGIS Image for ArcGIS Online

Updating your hosted imagery layer with ArcGIS Image for ArcGIS Online

ArcGIS Image for ArcGIS Online can host imagery layers that can be updated through the ArcGIS API for Python. For most users, having the most current relevant imagery for their organization is the reason that they are hosting their own imagery. Providing a common operating picture across the organization allows the best decisions to be made and improves coordination.  Imagery layers from the ArcGIS Living Atlas of the World are updated and maintained by Esri, which gives the user confidence that the layers they add today in their map will have the most current information even if they open those maps in the future, since the imagery layers referenced will be updated.

So how can organizations host and maintain their imagery like the ArcGIS Living Atlas?

Selected input image in an image collection
Individual images can be selected in dynamic imagery layers with the image collection configuration.

For ArcGIS Enterprise users, image services through ArcGIS Image Server can be updated regularly. Within each image service, the input images can be replaced, and new imagery can be added to maintain the currency of the imagery.

But what about ArcGIS Online users? What options do they have to host imagery layers that can be updated? Can users update all  imagery layers hosted through ArcGIS Image for ArcGIS Online? Are there any considerations when hosting updatable imagery layers? How can I update imagery layers?

In this blog, I will answer the questions in order. However, if you would rather see an example notebook yourself, then please check this notebook out to see an example of the code.

What options do users have to host imagery layers that can be updated?

Dynamic imagery layers with the image collection layer configuration can be updated once they are hosted.  That configuration creates an imagery layer similar to an image service from ArcGIS Image Server. Information about the input images is maintained, which allows you to remove the images when they need to be replaced and provides the flexibility to add new ones in a similar manner. Once they are created, dynamic imagery layers provide additional options to display the images. Dynamic imagery layers allow the user to define the display order, determine whether the images will be visible at all, or define which raster function template (RFT) is used to visualize them. For more information on dynamic imagery layers, please see this blog that discusses how they can be used within your organization.

Can users update all imagery layers hosted through ArcGIS Online?

No, not all the imagery layers hosted through ArcGIS Image for ArcGIS Online can be updated. Only dynamic imagery layers with the image collection layer configuration can be updated. These imagery layers are similar to image services created by ArcGIS Image Server and have attribute tables that allow for new images to be added and current images to be deleted. Currently, tiled imagery layers are fused during creation and are optimized for display, so the only way to update them is to delete and replace them. However, the ability to update tiled imagery layers is coming in a future release. For more information about tiled imagery layers, please see this blog about how tiled imagery layers are useful for your organization.

Are there any considerations when hosting dynamic image collection layers?

There are a couple of considerations with hosting updateable dynamic imagery layers, including the sharing level, update process, and update plan considerations.

 

Considerations for dynamic image collection
Considerations for hosting dynamic imagery layers that will be updated.

Sharing level 

Currently dynamic imagery layers can only be shared in ArcGIS Online within an organization. This means you can’t share dynamic imagery layers publicly. But you can share tiled imagery layers can be shared with everyone (using the Everyone sharing level). So, if you want to share an updated imagery layer with the public, you may have to consider using tiled imagery layers from ArcGIS Image or use an image service from ArcGIS Image Server. Keep in mind that dynamic imagery layers are currently the only imagery layer type in ArcGIS Image that can be updated. This means that you will have to manually delete and replace your tiled imagery layer each time you need to update it.

Update process

At this time, dynamic imagery layers can only be updated through the ArcGIS API for Python. In this blog, a Jupyter notebook is provided to show an example of how it can be accomplished. So, a certain level of Python coding experience is required to update these imagery layers.

Update plan 

Before creating your dynamic imagery layer, you should consider what the imagery layer updates will involve. A couple of the most common reasons to update an imagery layer are to :

Your update process may be a combination of these workflows.

For example, will your new images truly replace the older imagery, or will they have a different collection date? If you have decided to share an imagery layer covering your organization’s entire campus, but know that the input imagery will be replaced with new imagery each year, your update plan would likely have to decide how to treat the new imagery. Should it replace the existing images, or perhaps you want to maintain the existing imagery for historical reference.  If you decide to keep the existing imagery, you will need to consider whether to keep the existing imagery layer and then create a new imagery layer to stack together in a time series, or remove them in favor of the newer images. However, if you always need the latest imagery for an existing asset, then your update plan would include deletion and replacement of the input images.

Update possibilities for dynamic imagery layers with image collection layer configuration.
There are several different ways to update your dynamic imagery layer.

How can I update imagery layers?

Through the ArcGIS API for Python, a hosted dynamic imagery layer with the image collection configuration can be updated to maintain the relevance and currency that your organization desires. There are four updates that you can make to your dynamic imagery layer, including:

All of the update tools are available through the arcgis.raster.analytics module. The update possibilities can expand the spatial extent of the imagery layer or add more current imagery through the add_raster tool. You can delete images in the imagery layer that are no longer needed or need to be replaced with the delete image tool. If you notice that the imagery layer has unwanted pixels or NoData areas visible, then you can remove them by using the build_footprints tool. Finally, the build_overview tool can be used to improve the performance of the imagery layer by adding reduced resolution versions of the input images.

Here are some specific code samples for the processes described above to use in your notebook. Don’t forget that a Jupyter notebook has also been provided.

Code Sample when adding an image to an existing image collection

AddingImage = add_image(image_collection = ImageryLayer,

                            input_rasters[r"C:\RasterData\Optimized_cog.tif"],

                            raster_type_name = "Raster Dataset",

                            context={"buildFootprints": True,"footprintsArguments":{"method":"RADIOMETRY"}}

                           )

Code sample when deleting an image from an image collection

imagerylayer_delete = delete_image(image_collection = ImageryLayer, where="OBJECTID=1")

 

Once the dynamic imagery layer is updated in the notebook,  the updated imagery layer is available as an item in your ArcGIS Online organization. In addition to adding and removing input images, you can also perform additional updating including removing the NoData areas around the image (build_footprints), improve performance with additional overviews (build_overviews), and adjusting the stretching (calculate_statistics). While these tools can be used independently, you can also run several at once when adding input images.

Code sample when building the footprints

example_buildfootprint = build_footprints(image_collection=ImgLyr[0],
computation_method="RADIOMETRY",
gis=gis)

Code sample when building overviews

example_buildoverview = build_overview(image_collection=ImgLyr[0],
gis=gis)

 

Conclusion

If your organization needs to host an imagery layer that needs to be updated once it has been hosted, dynamic imagery layers are the solution for you. Once your imagery layer is created, you can use the ArcGIS API for Python to update it with fresh images, clean up the display of the existing layer, or adjust the visualization options. Updating the imagery layers keep them relevant and give confidence to your users that the imagery layers they are using will meet their needs for analysis, visualization, and decision making.

About the author

A Product Engineer on the Raster Team, who has been with Esri in various capacities since 2009, including as an Esri Support Analyst, and an Author for Esri Training Services.

Connect:
3 Comments
Oldest
Newest
Inline Feedbacks
View all comments

Next Article

Basemap Releases Include Over 300 New and Updated Communities

Read this article