GetImage

The GetImage ISCommand is used to create a raster dataset from an image service definition for a particular area of interest. You can specify the output location of the image generated. You can override parameters, such as the area of interest, compression method, tile size, and compression quality.

The default command line is:

ISCommand GetImage --ISDef=<PathToISDef> --XMin=<XMin> --YMin=<YMin>  --XMax=<XMax>  --YMax=<YMax> --NCols=<NCols> --NRows=<NRows> --Format=<Format> --CompressionMethod=<CompressionMethod> --CompressionQuality=<CompressionQuality> --TileSize=<TileSize> --CreateWorldFile=[True|False] --WriteGeoKeys=[True|False] --FileName=<OuputFileName> --OutputType=<File> --NBands=<NBands> --BitDepth=<BitDepth>

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.

For example:

ISDef://d:\Test\Sample.ISDef\ImageService.ISDef

User specified

Yes

FileName

Output file name

User specified

Yes

Format

The output raster format.

TIFF, JPEG2000, JPEG, PNG

TIFF

Yes

CreateWorldFile

When True a world file will be created.

True, False

True

No

WriteGeoKeys

When True GeoTIFFs will be generated.

True, False

False

No

XMin

Leftmost X coordinate of the set extent.

User specified

Yes

YMin

Bottommost Y coordinate of the set extent.

User specified

Yes

XMax

Rightmost X coordinate of the set extent.

User specified

Yes

YMax

Topmost Y coordinate of the set extent.

User specified

Yes

NCols

Number of columns of pixels in the exported image.

1000

Yes

NRows

Number of rows of pixels in the exported image.

1000

Yes

TileSize

Size of tiles in the exported image for TIFF images only.

0, 64, 128, 256, 512, 1024

256

No

CompressionMethod

Method of compression to be used to create external overviews.

None, JPEG, LZ77

None

No

CompressionQuality

Quality of the compression.

0-100

100

No

NBands

The number of bands that will be mosaicked together to form the output of the image service.

Any number, 1 or greater.

3

Yes

BitDepth

The number of bits of the image.

1, 2, 4, 8, 12, 16, 32, etc.

8

Yes

A GeoTIFF (TIFF file with the georeferencing and projection parameters in the header) raster dataset can be generated by setting the WriteGeoKeys parameter to true. By default, this option is set to false.

Example:

ISCommand GetImage --ISDef=ISDef://d:\Test\Sample.ISDef\ImageService.ISDef --XMin=0 --YMin=-7500 --XMax=11500 --YMax=0 --NCols=1000 --NRows=1000 --Format=TIFF --CompressionMethod=LZ77 --CreateWorldFile=True --WriteGeoKeys=False --FileName=d:\amberg.tif