AddTIFFs
The AddTIFFs ISCommand is used to add raster datasets stored as TIFF files to an image service definition.
The command line is:
ISCommand AddTIFFs --ISDef=<PathToISDef> --Folder=<PathToFolder> --Files=<PathToFile> --Recursive=[Yes|No] --Filters=<Filters> --DefaultSrs=<DefaultSrs> --ForceDefaultSrs=[True|False]
The input folder specifies the folder where raster datasets are located. Filters specify the type of files to be added, for example, *.tif is used to specify a TIFF file.
The table below defines the variables that are required to use this script. Most variables are defined within the script. You can either make an edit to the script or enter the variable at the command line as shown below.
Variable |
Description/Options |
Default |
Required |
||
ISDef |
Path and name of the image service definition file to which you want to add the rasters. |
User specified |
Yes |
||
Folder |
Path and name of the folder containing the input rasters. |
User specified |
If Folder=Yes, File=No. If Folder=No, File= Yes |
||
Files |
Path and name of one or more files. A comma is used to delimit multiple files. No wild cards are allowed. |
User specified |
File= Yes |
||
Recursive |
Search folders recursively.
|
Yes |
No |
||
Filters |
The file extension to identify the raster type. |
*.TIFF *.TIF |
No |
||
DefaultSrs |
The spatial reference system used for the image service, for all internal searches and derived tiles. To define the default spatial reference system, you need to specify the text as an argument or embed it in a script. |
World Mercator |
No |
||
ForceDefaultSrs |
Use the DefaultSRS rather than one specified with each raster.
|
False |
No |
Example:
ISCommand AddTIFFs –-ISDef=c:\Test2.ISDef\ImageService.ISDef --Folder=d:\rasters\ –-Filters=*.TIFF|*.tif
The spatial reference system can also be changed. The default spatial reference system in the sample script is defined as World Mercator (WGS84). You can override this in the command line. However, since the spatial reference system is a long string, it is easier to edit the DefaultSrs node in the XML.