The CARIS1 Batch utility runs command-line processes on marine products generated from CARIS applications.
CARIS Batch is installed in the \Bin folder of a CARIS application. The processes available in CARIS Batch is dependent on the licensed modules that have been enabled in the desktop application. The processes available will also differ based on the application from which the command prompt was launched; only processes included with the licenses of the initiating application will be available.
The basic syntax for carisbatch is shown below:
carisbatch --run <process_name> <parameters> <input> <output>
The -r key or --run parameter is required to run a process.
Processes are bound by the following rules:
• Parameters are identified either by character keys or parameter names. Keys use a single-hyphen prefix (-h) and parameter names use a double-hyphen prefix (--help).
• Values are separated from parameters by a space (e.g. -n 6).
• Parameter values containing spaces must be enclosed in quotation marks (e.g. -c "New DSID Comment").
• Process names are not case-sensitive, but parameter names are. Be careful when entering parameters.
Input can be either a file or a URI-based data store. Output can also be to a file or database.
File paths with spaces must be enclosed in quotation marks. For example, "C:\Directory Name\Sample File". Otherwise, the path and name can be entered without quotation marks. For example, C:\DirectoryName\SampleFile.
A universal resource identifier (URI) is required to access a database.
• If the input is a coverage database from Bathy DataBASE2 (BDBTM), it can be specified with a URI to the coverage:bdb://user:password@servername/databasename/boid, where:
• bdb:// identifies a BDB database
• user:password@servername is the connection string to the BDB node manager
• databasename/boid is the path to the coverage (CSAR)
For example:bdb://dba:sql@server2012machine1/databasename/02000001.
• If the input is a HIPS file from HIPS and SIPS3, it can be specified with a URI or URI query to the HIPS file. The URI can include any combination of one or more vessels, days and/or lines. When specifying more than one of a component, they must be separated by a semi-colon. Some examples are shown below:
• A URI with 2 vessels: file:///C:/Data/Demo.hips?Vessel=Voyager;Vessel=DeepSea
• A URI with 1 day: file:///C:/Data/Demo.hips?Day=2015-044
• A URI with 2 lines: file:///C:/Data/Demo.hips?Line=1344_20080926_202553_Voyager;Line=1345_20080926_210050_Voyager
• A URI with 1 vessel, 1 day and 1 line: file:///C:/Data/Demo.hips?Vessel=DeepSea;Day=2000-001;Line=1345_20080926_210050_Voyager
Common Parameters
The following table lists common parameters that can be used to run a process, view information or define settings. These parameters are common to all processes.
Parameter |
| |
|---|---|---|
Long | Short | Description |
--help | h | Print the help, including available options. Example: carisbatch --run <process_name> ‑‑help |
--list-processes | l | Print a list of available processes. |
--run | r | Run a process. |
--verbose | v | Print verbose messages. |
--version | Print the executable version and copyright information. | |
--set-option | Set an application option. This is similar to defining options in the application using Tools > Options. You must provide the full option name followed by the desired value. If the value is a file, the full path and name of the file must be specified. | |
--get-option | Get an application option. This will return the current value of a specified option. | |
--list-options | List all application options. This provides a list of all options that can be defined, the name used to define them via CARIS Batch and their current values. | |
--validate-options | Validate the application options. This ensures that all settings populated with a file or folder path are valid and that all mandatory options are set. | |
--override-option | Override an application option for the current process being run only. | |
--write-process-log | Write process information to a log file upon completion of the process run. | |
Running CARIS Batch
CARIS Batch is run from the Command Prompt window. In order to ensure the environment is setup correctly, you can:
• start the command prompt from the Start menu, CARIS > (application) (version) > (application) (version) Command Prompt, or
• start any command prompt and run the environment batch script in the install directory e.g. C:\Program Files\CARIS\<application>\<version>\system\caris_env.bat, or
• start the command prompt from the CARIS utilities toolbar
To use the utilities toolbar, open a CARIS application and go to View > Toolbars > Utilities. Select Show command prompt from the toolbar drop down list. Click the play button to run the utility.
1. Open the Command Prompt window.
2. Type carisbatch --run followed by the process and parameters.
3. Press <Enter>
The selected process is run.
Defining Environment Settings
Some processes access the environment settings of the application when processing data. These settings are normally defined using Tools > Options in the application, but options are also provided in CARIS Batch to view and edit the environment settings without needing to launch the application.
To edit environment settings:
1. Run the ListOptions command to determine the names of the environment settings and their current values.
carisbatch --list-options |
2. In the resulting list, locate the setting you wish to define.
3. Run the SetOption command, specifying the name and value of the option you want to define.
In the example below, the Catalogue Control option under the Files and Folders category is being changed to point to a custom catalogue control file.
carisbatch --set-option FilesAndFolders/Files/CatalogueControl "C:\Users\ljacquard\AppData\Roaming\CARIS\BASE Editor\5.1\customcataloguecontrol.xml" |
4. [Optional] Run the ValidateOptions command to ensure that the changes were implemented correctly.
carisbatch --validate-options |
If there are no errors, a message will be returned stating that all options are valid.
Alternatively, the OverrideOption key can be used to define an environment setting for only a single run of a particular command rather than changing the setting in the environment.xml file for the application. To use this option, it must be included in the command line for the process being run. For example, when running a process that will output a new CSAR coverage, such as GeneralizeRaster, you may wish to have the bounding polygon for that coverage generated with more detail than the default setting of Medium. To accomplish this, the OverrideOption key would be included in the command line with a value to override the Bounding Polygon Level option, as seen below.
carisbatch --run |
1 This term is a trademark of Teledyne Digital Imaging, Inc. Reg. USPTO and CIPO.
2 This term is a trademark of Teledyne Digital Imaging, Inc. Reg. USPTO.
3 This term is a trademark of Teledyne Digital Imaging, Inc. Reg. USPTO.