ArcGIS Living Atlas

Overwrite Feature Services Script Tool for Automating Updates

The Earth’s systems are subject to boundless changes. From pressure gradients at the surface that unleash storms and generate floods, to increasing air temperatures that can lead to dryer conditions that cause water stress in our crops. Understanding these systems can lead us to (1) better infrastructure design, (2) improvement of our response during natural disasters, and (3) better planning and management practices that benefit our society.

These systems are often described by environmental information that change frequently using near-real time or forecasting data. Online environmental layers are subject to regular updates that help display the latest information. The Overwrite Hosted Feature Services (OverwriteFS) tool can be used to automate and standardize data updates, from short frequency updates that happen every 15 minutes, to periodic monthly updates.

Fire Detection

Overwrite Hosted Feature Services tool

The OverwriteFS tool allows you to automate the updates of a hosted feature service using a Python script. This script updates a hosted feature service in ArcGIS Online or Enterprise using local or external data sources.

For example, the USA Weather Watches and Warnings item in Living Atlas displays the watches, warnings, and advisories from the National Weather Service (NWS). The OverwriteFS script updates the USA Weather Watches and Warnings feature service every 5 minutes. So, if new warnings are issued or other warnings are prescribed, the hosted feature service reflects these changes in near real-time.

USA Weather Watches and Warnings

The OverwriteFS script also includes options or switches to be customized to different workflows. For example, the USA Weather Watches and Warnings uses the SwapLayers switch along with a hosted View. The SwapLayers switch enables you to overwrite a target feature service while a live feature service supports the View. In this workflow, the hosted feature service layers are swapped in the hosted view when the update process is complete, minimizing downtime during updates and optimizing the user experience.

Another example are the Sea Ice Extent layers for the Arctic and Antarctic. The sea ice extent layers are updated once a month by the OverwriteFS script tool, adding a polygon with the sea ice extent for the last month. The sea ice extent live feed routine leverages the Append switch to update existing or insert new records to the feature services, supporting the Append and Upsert workflows in addition to Overwrite.

Sea Ice Aware

Note: The data source type in overwrite should be the same as used to originally publish the feature service. There are many format options to choose from, such as json files, url link, zipped geodatabases, or service definition (SD) files. You can select the best format that fits the data set and your workflow. Simply publish the source data as a hosted feature service and then use the OverwriteFS script tool to keep it updated.

For a complete list of the OverwriteFS script switches, requirements, command-line examples, and samples review the ReadMe file included in the OverwriteFS tool documentation.

OverwriteFS script and ArcGIS Notebooks

The OverwriteFS script can be run within ArcGIS Notebooks, either as a stand-alone jupyter notebook, an embedded notebook in ArcGIS Pro, or a hosted notebook in ArcGIS Online. For hosted notebooks in ArcGIS Online, you can also leverage the Manage Notebook Code Dependencies (MNCD) tool to manage different external python modules, keeping your Notebook code up to date. You can schedule a notebook task to automate the process of updating a hosted feature service.

Notebook task

Live Feeds layers in ArcGIS Living Atlas of the World

ArcGIS Living Atlas of the World includes a set of environmental layers, collectively known as Live Feeds, that are updated frequently using the Aggregated Live Feed (ALF) methodology and the OverwriteFS tool. The Live Feed layers in Living Atlas include environmental data sets such as Active Hurricanes, Recent Earthquakes, Arctic and Antarctic Sea Ice Extent, Temperature Anomaly, River Flow Forecast, and Thermal Hotspots. You can create your own live feed layers using the OverwriteFS tool to automate data updates. You can also nominate those layers to Living Atlas to share them with a wider community of users.

Summary

Environmental information is ever-changing, and the online layers must be updated frequently to reflect the latest conditions of the earth system. The Overwrite Hosted Feature Services (OverwriteFS) tool empowers you to automate data updates of ArcGIS Online items, keeping layers displaying the latest information available in near-real time.

More Information?

Join the Esri Community and ask a question to our experts.

About the author

I’m an expert on the integration of global and large data sets into applied research, especially in the fields of water resources and environmental engineering. I’m part of the Living Atlas of the World team. I’m strongly committed to the improvement of workflows through automation of routines. I have a keen interest in Web GIS, data science, and education.

Connect:
0 Comments
Inline Feedbacks
View all comments

Next Article

Quick tips for mastering the ArcGIS StoryMaps builder

Read this article