RequestImage

The RequestImage ISCommand is used to create raster dataset with different formats from an image service definition or published image service. Additionally, it can be used to extract metadata information from an image service for a particular area of interest. You can specify the output file name and location to saving the generated metadata information. Additionally, you can override various parameters, such as the area of interest, compression method, tile size, metadata type, and compression quality.

The default command line is:

ISCommand RequestImage --ImageService=<Fully qualified image service name>  --XMin=<min x-coordinate> --YMin=<min y-coordinate>  --XMax=<max x-coordinate>  --YMax=<max y-coordinate> --NCols=<number of columns> --NRows=<number of rows> --Format=[TIFF|JPEG2000|JPEG|None] --CompressionMethod=[None|JPEG|LZ77] --CompressionQuality=<percentage> --TileSize=[0|64|128|256|512|1024] --CreateWorldFile=[True|False] --WriteGeoKeys=[True|False] --FileName=<OuputFileName> --GenerateImageMetadata=<TRUE|FALSE> --MetadataType=<Level of metadata> --MetadataFileName=<Output File Path>

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

ImageService

Path and name of the fully qualified image service.

Examples include:

ImageService://ServerHost:3982/LandsatWorld
ISDef://d:\test\LandsatWorld.ISDef\ImageService.ISDef
ISCDef://d:\test\LandsatWorld.ISCDef
D:\test\LandsatWorld.ISRef

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 image.

1000

Yes

NRows

Number of rows of pixels in the image.

1000

Yes

TileSize

Size of tiles in the image.

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

GenerateImageMetadata

When True the image metadata is generated.

True, False

False

Yes

MetadataType

Defines the level of image metadata

Basic

Yes

MetadataFileName

The output file path for saving the metadata information

ImageMetadata.xml

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.

Additionally, you can generate images using this command, without having to install ArcGIS Desktop or Service Editor (with .NET Support).

Example:

ISCommand RequestImage --ImageService=ImageService://ServerHost:3982/LandsatWorld --XMin=0 --YMin=-7500 --XMax=11500 --YMax=0 --NCols=1000 --NRows=1000 --Format=TIFF --CompressionMethod=LZ77 --CompressionQuality=100 --TileSize=256 --CreateWorldFile=TRUE --WriteGeoKeys=FALSE --FileName=d:\amberg.tif --GenerateImageMetadata=TRUE --MetadataType=Basic --MetadataFileName=C:\Test\ImageMetadata.xml