CARIS BASE Editor : CARIS Batch Utility : Introduction : Overview
 

Overview

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. For a complete list of CARIS processes, see A batch script calling carisbatch.exe, should test the exit code. See the following example..

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

Parameters are case-sensitive. Check the help message to determine parameter settings.

Information about CARIS Batch or individual processes is available. See the following table.

Parameter

 

Long

Short

Description

--help

h

Print the help, including available options.

Example: carisbatch --run <process_name> ‑‑help

--list-processes

l

Print the 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.

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.

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

The processes available in CARIS Batch differ based on the application from which the command prompt was launched and the modules enabled in the application.

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 GeneralizeRaster --radius 400m --resolution 20m ‑‑apply-designated --override-option Coverage/General/BoundingPolygonLevel Fine D:\Data\input.csar D:\Data\output.csar


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.