How to create an image service definition using ISCommands

Typically, an image service definition is created within ArcMap using the Image Service Definition Editor toolbar. But, to automate the creation of an image service definition you can use ISCommands. In either case there is a typical workflow to follow when creating in image service definition, such as:

1. Create a new image service definition, thus creating an image service definition file (.ISDef).
See, the CreateService ISCommand
2. Add raster datasets to the image service definition.
See, the AddTIFFs or AddRPDefs ISCommands
3. Build the image service definition. During this first build operation, you are deriving and validating service parameters such as pixel size ranges and boundaries.
See, the BuildService ISCommand
4. Optimize the image service definition. This is optional; however, it is highly recommended. Optimization options include generating service overviews, derived rasters, and derived tiles.
See, the DefineServiceOverviews, DefineDerivedRasters, or DefineDerivedTiles ISCommands.
5. Build the image service definition. During this second build operation, you are computing derived images (the service overviews).
See, the BuildService or GenerateDerivedImages ISCommands
6. Compile the image service definition, thus creating a compiled image service definition (.ISCDef).
See, the CompileService ISCommand

For more information, see The workflow to create an image service definition.

When using the ISCommands you can run each individually (one after the other) or list them together in a batch file (such as NewService.bat). The following shows a list of ISCommands and their parameters that could be run separately or saved and run in a batch file to create and add data to an image service and make it ready for serving:

ISCommand CreateService --ISDef=D:\Services\Amberg_Auto.ISDef

ISCommand AddTIFFs --ISDef=D:\Services\Amberg_Auto.ISDef\ImageService.ISDef --Folder=D:\Datasets\Amberg\images\

ISCommand BuildService --ISDef=D:\Services\Amberg_Auto.ISDef\ImageService.ISDef

ISCommand DefineServiceOverviews --ISDef=D:\Services\Amberg_Auto.ISDef\ImageService.ISDef --OutputFolder=D:\Services\Amberg_Auto.DerivedImages\SO --BasePixelSize=0.61

ISCommand BuildService --ISDef=D:\Services\Amberg_Auto.ISDef\ImageService.ISDef --OutputProperties=True --DeriveImages=True --DeriveBoundary=False --ComputePixelSizeRanges=False

ISCommand CompileService --ISDef=D:\Services\Amberg_Auto.ISDef\ImageService.ISDef --ISCDef=D:\Services\Amberg_Auto.ISCDef

In this example, the Amberg_Auto image service definition was created. A number of TIFF files were added and the image service definition was built to compute the pixel size ranges, create the boundary, and to compute the output pixel properties. The service overviews were then defined and built. Finally, the image service definition was compiled to be ready for publishing.