EditRasterDatasets

The EditRasterDatasets ISCommand is used to edit multiple raster process definition (.RPDef) files simultaneously.

The command line is:

ISCommand EditRasterDatasets --ISDef=<PathToISDef> --SelectQuery=<Query to select the rasters> --SearchNode=<Xpath for the node to be searched> --Search=<The value to be changed> --Replace=<The new value>

Note: If the values of the command line parameters contain white spaces, the values must be specified within double quotes.

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.

User specified

Yes

SelectQuery

The query used to select the rasters.

 

For string values, make sure it is mentioned within the single quotes in addition to the double quotes used for the whole expression.

 

Example:

 

SelectQuery="RasterId='06102415314312900072'"
SelectQuery="RasterType='SO'"

 

Numeric values can be entered without single quotes.

 

Example:

SelectQuery="MaxPS>10.0"
SelectQuery="MaxPS<10.0"

 

Enter "ALL" to select all raster process definition files.

SelectQuery="ALL"

String

Yes

SearchNode

Xpath for the node to be searched

String

Yes

Search

Define the value that has to be changed.

 

You can also search for substrings with in a node and replace it with another value. For example, to search for the value 'JPEG2000' and replace it with 'JP2' within a node, use the following format to search and replace. If there are blanks in the Search value then the value needs to be enclosed in double quotes.

 

You can also search for an empty string within a particular search node and replace it with any value by using the asterisk (*) symbol.

 

Example:

--Search=EG2000 --Replace=2
--Search="EG 2000" --Replace=2
--Search=*

String

Yes

Replace

Define the new value.

 

If there are blanks in the Replace string then the string needs to be enclosed in double quotes.

 

Example:

--Replace=EG2000
--Replace="EG 2000"

String

Yes

Example:

ISCommand EditRasterDatasets --ISDef=c:\Test1.ISDef\imageservice.isdef --SelectQuery="MaxPS<10.0" --SearchNode=//ImageServer/RasterProcessDefinition/LoPixelSize --Search=100 --Replace=1000