AnsweredAssumed Answered

Format for ImageServer input parameter in arcpy MakeImageServerLayer_management

Question asked by tony@vestra.com on Jun 30, 2017
Latest reply on Jun 30, 2017 by tony@vestra.com

Regarding Make Image Server Layer—Data Management toolbox | ArcGIS Desktop 

 

When attempting to use a URL as the input parameter, as shown in the documentation, it results in a "000999: Failed to get raster" error. 

 

Extent = "-13072350.2812 4050838.0059 -12990486.2246 4075450.729"
Input_ImageServer = "http://servername.gov/arcgis/rest/services/folder/RasterName_1/ImageServer"
ImageServer_OutLayer = "Output_Layer"

arcpy.MakeImageServerLayer_management(Input_ImageServer, ImageServer_OutLayer, Extent, "", "Center", "", "0", "", "30")

 

However, if I use a GIS server connection from ArcCatalog (to the exact same image service), it works.

 

Extent = "-13072350.2812 4050838.0059 -12990486.2246 4075450.729"
Input_ImageServer = "GIS Servers\\connection name\\folder\\RasterName_1.ImageServer"
ImageServer_OutLayer = "Output_Layer"

arcpy.MakeImageServerLayer_management(Input_ImageServer, ImageServer_OutLayer, Extent, "", "Center", "", "0", "", "30")

 

I'd like to be able to use this as advertised with a URL, to avoid needing a pre-defined connection property. Adding a port number as shown in the documentation didn't appear to make a difference. Has anyone made this work? Perhaps I'm missing a step or parameter that needs to be set when the image service is published?

 

Thanks!

Outcomes