Clip Raster tool - image service as input?

1375
2
02-27-2020 03:38 PM
LesleyBross1
New Contributor III

Is it possible to use the Clip Raster tool with an image service selected as the Input Raster in Pro? I don't want to add it as a map layer first. The tool allows me to select the image service, but then presents errors about it not being a raster/mosaic dataset/layer. I was able to do this using ArcMap. Still using v2.4.2.

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

From the 2.5 help

Clip Raster—Data Management toolbox | Documentation 

Cuts out a portion of a raster dataset, mosaic dataset, or image service layer.

You could probably sniff around to see if it was added in 2.5

There is a great video here

What's new in ArcGIS Pro 2.5—ArcGIS Pro | Documentation 

or you could troll through the bug/enhancement list here

Release notes for ArcGIS Pro 2.5—ArcGIS Pro | Documentation 

Or just install 2.5.

If it doesn't work with 2.5, then there is something wrong with the image service.

0 Kudos
LesleyBross1
New Contributor III

Thanks Dan. It turns out that this does work in 2.4.2, but you have to have the uri for the ImageServer exactly right. I added the ImageServer to my project in Pro. When I tried to run the clip tool, I clicked on the folder icon to navigate to the image service that I wanted to use. This is the string that populated the Input Raster field: C:\Users\lbross\Documents\ArcGIS\Projects\MyProject1\arcgis on serverName\DAILY_SWE_NORMALS\daily_swe_normal_apr_01.ImageServer. But apparently the GP tool cannot address the image service in this format.

I went back to ArcMap and retrieved the url that had worked previously: http://serverName/arcgis/services/DAILY_SWE_NORMALS/daily_swe_normal_apr_01/ImageServer. When I pasted this into the GP tool, I did not receive an error and the clipping worked! I hope that this works with the Pro SDK which is where I'm actually hoping to use it. 

As an aside, when you're doing ArcDevelopment, it's not super easy to upgrade to the latest version. I have to keep my add-ins and my Python scripts in sync with what my users are using. These frequent releases of ArcPro will take some getting used to.

0 Kudos