Connecting to Image Server

1379
3
08-16-2011 01:29 PM
BethBaily
New Contributor
Is there a way to access an image using a python script the way you would using the Add Image Server Connection dialog?  I'd like to write a script that connects to an image server on our network. I need to determine the time it takes to access these images from different office locations and I thought a python script would be a great way to accomplish it. But I can't find any information on arcpy connecting to an image server.
Tags (2)
0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor
I would recommend migrating from Image Server to Mosaic Datasets.  You can very easily access Mosaic Datasets using arcpy.  Note:  ArcGIS 10 is the last release of Image Server.

http://resources.esri.nl/downloads/ArcGIS_10_Deprecation_Plan.pdf

ArcGIS 10.0 is the last release of the stand-alone ArcGIS Image Server product. This product has been replaced with the ArcGIS Server Image Extension. Any existing users of the stand-alone Image Server product or technology (using ISDef files), should plan their migration to the ArcGIS Server Image extension. Existing ArcGIS Image Server users should migrate from using ISDef file to using the Mosaic Datasets, a new data model in the geodatabase for managing collections of imagery and rasters. Mosaic Datasets are created and edited with ArcGIS Desktop (ArcEditor and ArcInfo) and published using ArcGIS Server with the Image Extension. Existing ISDef files can be added to Mosaic Datasets for conversion.
0 Kudos
BethBaily
New Contributor
Sounds like a great suggestion.  Unfortunately, I don't have any control over this.

Is there any way to connect to an image service using arcpy????
0 Kudos
colintalbert
New Contributor
The documentation on this is sparse and not that helpful.

What I've found through trial and error:

To add an image service to a map I add a layerfile that I created previously that points to the image service.  You can then manipulate the definition query to select how it's displayed.

To add one from scratch I use something like the following, but you won't have control over symbology, etc:

    url_ndvi =  r"GIS Servers\arcgis on www.sciencebase.gov\phenology\ndvi.ImageServer"
    inpoly = r"I:\NPS_NPMP_data\PythonCode\testPhenoTools\Sheldon_Boundaries.shp"
    #the inpoly is used to set the extent


    #pull our image service data
    arcpy.MakeImageServerLayer_management(url_ndvi, "tmp_extract1", inpoly)
    #make a arcpy layer from it so that we can manipulate it
    imgSvrLayer1 = arcpy.mapping.Layer("tmp_extract1")
0 Kudos