Automation of the Service Editor using ISCommands
About the automation of the Service Editor
The Service Editor can be automated using the ISCommand.exe; a command-line tool installed with the ArcGIS Image Server Developer Kit. The ISCommand.exe is available in the <Home>ArcGIS\ImageServer10.0\bin folder. This tool uses an .ISCmd file as a script, which contains commands for sequential actions. This document contains information about the .ISCmd files that can be used to perform common actions allowing users to override parameters and source datasets.
To use these scripts, the ISCommand.exe is used. The sample scripts are installed with the developer kit in the <Home>ArcGIS\ImageServer10.0\Developer Kit\Automation folder. All command line calls begin with “ISCommand” at the DOS prompt. In the command line, the variables can be entered in any order. Enter “--” followed by the variable name, followed by “=”, then the variable value, such as: --ISDef=c:\ABC.ISDef.
A simple example to be executed at the DOS prompt is:
ISCommand.exe <full-path-to-script> --ISDef=<path_and_image_service_definition_name.ISDef>\ImageService.ISDef
This command-line example has a variable called ISDef that points to the specified location where your image data resides. The variable is used within the ISCmd file (search for {ISDef}). You can easily modify the Extensible Markup Language (XML) file and change any of the properties or include new variables using curly-braces ("{" and "}").
Generally, when entering a value for the --ISDef variable, you need to point to the ImageService.ISDef file within the .ISDef folder. For example, you will enter:
--ISDef=c:\ABC.ISDef\ImageService.ISDef
There is another variable used by many of the iscommands, called --ImageService. This variable can point to an image service definition, to a published image service, to an image service reference (.ISRef) file, or to a compiled image service definition (.ISCDef) file. When pointing to an image service definition you need to specify that its coming from an ISDef using "ISDef://", followed by the path to the ImageService.ISDef, for example:
--ImageService=ISDef://c:\ABC.ISDef\ImageService.ISDef
When pointing to a published image service, you need use "ImageService://", followed by the server name, a colon (:), the port number, a forward slash (/), and the image service name. For example:
--ImageService=ImageService://TestServer:3982/Redlands_DOQQ
When pointing to an .ISRef, you only need to specify the path and file name. For example:
--ImageService=D:\Temp\ABCservice.ISRef
When pointing to an .ISCDef, you need use "ISCDef://", followed by path and name of the .ISCDef file. For example:
--ImageService=ISCDef://C:\ABC.ISCDef
ISCommand scripts
The ArcGIS Image Server setup installs all the ISCommand scripts in <Home>\Developer Kit\Automation\ISCommands folder. These scripts allow you to create new service definitions, add raster datasets, build, optimize, compile and publish the service definition.
Default command lines are given for all the ISCommands that allow you to override certain parameters. Parameters that can be overridden are generally defined in the .ISCmd script file under the Variables node along with their default values. If these nodes are not defined in the command-line, the default values are taken. You can edit the .ISCmd files to change the defaults.
Before running ISCommands in the Command window, you will need to update the system PATH variable to include the <Image Server\Bin> folder where ISCommand.exe is installed. The path needs to be set every time a new session of Command window is initiated. Type the following command in the command prompt to set the path:
SET PATH=<ImageServerBinFolder>;%PATH%
where <ImageServerBinFolder> is the path to ArcGIS Image Server Bin folder. By default, this is C:\Program Files\ArcGIS\ImageServer10.0\Bin.
An example for the SET PATH command when ArcGIS Image Server is installed in C:\Program Files is given below:
SET PATH=C:\Program Files\ArcGIS\ImageServer10.0\Bin;%PATH%
Alternatively, you can run ISCommands without updating the PATH, by directly executing it from the Bin folder. However, you will have to set the working directory in the command window to <ImageServerBinFolder>. By default, this is C:\Program Files\ArcGIS\ImageServer10.0\Bin.
Note:
If the values of the command line parameters contain white spaces, the values must be specified within double quotes.
The SET PATH command is valid only for that current session of the Command window. If ISCommands are executed without setting the path or setting the working directory to Bin folder, it won’t work.
ISCommand |
Description |
Adds raster process definition files to an image service definition. |
|
Adds TIFF raster datasets to an image service definition. |
|
Builds an image service definition boundary shapefile. |
|
Calculates the cell size ranges of an image service definition. |
|
Builds an image service definition. |
|
Clips the footprint of a raster dataset by the image service definition boundary. |
|
Compares two files. |
|
Creates a compiled image service definition (.ISCDef) file. |
|
Redefine the footprint for each raster dataset by considering the warping once the raster dataset is georeferenced. |
|
Redefines the footprint for each raster dataset based on a valid pixel value range. |
|
Creates a new image service definition. |
|
Defines derived rasters for an image service definition. |
|
Defines derived tiles for an image service definition. |
|
Defines service overviews for an image service definition. |
|
Edit multiple raster process definition (.RPDef) files. |
|
Executes external applications. |
|
Extracts log files into a database. |
|
generates the derived images defined in the derived image definition (.DIDef) file. |
|
Generates the .DIDef file for an image service definition. |
|
Generates histograms for an area of interest from an image service definition. |
|
Generates seamlines polygons for each raster dataset in an image service definition. |
|
Generates a histogram from a raster dataset. |
|
Requests an image from an image service for a particular area of interest. |
|
Requests the service information from an image service. |
|
Creates raster datasets with different formats from an image service definition or published image service. |
|
Creates raster datasets with different compression methods for a particular area of interest from an image service definition or published image service. |
|
Selects raster datasets in an image service definition. |