Imagery layers in ArcGIS Online are more than just data—they are foundational decision‑making tools. They support analysis, power visualizations, and enable collaboration across teams and organizations. When this foundation is current, every web map, app, and workflow built on top of it becomes more accurate, reliable, and valuable.
Keeping imagery layers up to date is one of the simplest and most effective ways to improve the quality of your GIS outputs. With recent enhancements to the ArcGIS API for Python, updating hosted imagery layers—both dynamic and tiled—is now more flexible and scriptable than ever.
Imagery layers can be updated through the ArcGIS API for Python. Previously, you could update dynamic imagery layers (configured as an image collection) by removing and adding new imagery through the ArcGIS API for Python.
Why Updating Imagery Layers Matters
Organizations frequently rely on imagery to monitor change, assess conditions, and communicate insights. However, outdated imagery can quickly undermine trust and effectiveness. Whether you are working with aerial captures, seasonal satellite imagery, or operational raster outputs, maintaining current imagery ensures:
- More accurate analysis results
- Consistent and reliable visualizations
- Fewer downstream updates to dependent apps and maps
- Increased confidence for stakeholders and decision-makers
Updating Imagery Layers with the ArcGIS API for Python
Historically, updating a hosted imagery layer in ArcGIS Online often meant removing and re-adding individual images within an image collection. While effective, this approach is not always ideal-especially when you want to refresh the entire dataset at once.
With recent enhancements, the ArcGIS API for Python now supports an alternative approach: replacing all imagery within an existing imagery layer while keeping its item details intact. This means:
- Item ID remains the same
- Layer URL does not change
- Web maps, apps, and sharing permissions continue to work
- Only the underlying imagery data is replaced
This workflow supports both dynamic and tiled imagery layers and can be automated in Python notebooks for repeated updates.
Example python notebook: Overwrite Hosted Imagery Layer
Using the Copy Raster Task
The key to this workflow is the copy_raster task, available in the raster.analytics module of the ArcGIS API for Python.
What the Copy Raster Task does
The copy_raster task takes raster input data updates an imagery layer using server-side, parallel processing. During this process, you can:
- Clip imagery to an area of interest
- Resample pixel resolution
- Reproject to a target spatial reference
- Replace all existing imagery in the target layer
The input data can be:
- A single raster
- Multiple rasters stored locally
- Raster data stored in cloud
NOTE: When using copy_raster to overwrite an existing imagery layer, the output name should be the item object that will be updated.
Example Code
from arcgis.raster.analytics import copy_raster
ImgLyr = gis.content.search(query="NewNameOfImageryLayer", item_type='Imagery Layer')
Img = r"C:\<Folder>\<Subfolder>"
ImageryLayer = copy_raster(input_raster=Img,
output_name = ImgLyr[0],
gis=gis)
In this example:
- Local raster data is uploaded to ArcGIS Online
- The imagery in mosaicked into a single imagery layer
- The existing hosted imagery layer is overwritten with the new data
Once the process completes, the imagery layer details remain unchanged, but the imagery itself reflects the most up-to-date dataset.
ArcGIS Enterprise vs. ArcGIS Online
For ArcGIS Enterprise users running ArcGIS Image Server , updating imagery is a capability of Image Server. Image services can be refreshed by adding, removing, or replacing source rasters directly within each service.
But what about ArcGIS Online users?
Common questions:
- Can all hosted imagery layers be updated?
- Are there considerations when hosting updatable imagery?
- What workflows are supported for updating your imagery with the most current data?
With the copy_raster task, ArcGIS Online users now have a reliable method to fully refresh hosted imagery layers, answering these questions with a clear and scalable solution.
How the Update Process Works
When you use copy_raster to update an imagery layer:
- All existing imagery data is replaced
- The imagery layer item, metadata, and sharing settings are preserved
- The updated layer contains only the imagery specified in the task
This makes it ideal for workflows such as:
- Regularly refreshed satellite mosaics
- Periodic aerial imagery updates
- Ongoing drone imagery projects
- Time-based visualizations
Important Considerations
When updating your imagery layers, there are a few important considerations as you decide when updating your imagery layer, including the following:
- Pre-processing requirements – Depending on your imagery layer, you may need to preprocess and update the input imagery data in ArcGIS Pro before updating the hosted imagery layer.
- Original input imagery will be deleted – When updating your imagery layer, the original imagery data used to create it will be deleted and replaced by the new imagery data.
Conclusion
For organizations that need to present a near-real-time or continually refreshed view of the world, this workflow offers a powerful capability. By scripting updates in Python notebooks, you can automate imagery refresh cycles and ensure your GIS ecosystem always reflects the latest information – without disrupting users or applications.
If you’d like to see the workflow in action, check out the Overwrite Hosted Imagery Layer for a complete working implementation.
Article Discussion: