CARIS Batch Utility : BASE Editor Processes : Export Coverage to ASCII
 

Export Coverage to ASCII

Description

The ExportCoverageToASCII process exports band values from a coverage to an ASCII file. The format is essentially CSV but the user can specify the delimiter to be something other than a comma.

Inputs

A point cloud or raster dataset.

Outputs

An ASCII text file.

Command Line Syntax

carisbatch --run ExportCoverageToASCII --include-band <value> ‑‑coordinate-format <value> [options] <input> <output>

Options

The following table describes the parameters available for this process.

Example

Parameter

 

Long

Short

Description

Can Repeat

Notes

 

--include-rejected

j

If set, rejected values in the input are included in the output.

FALSE

--include-header

a

If set, the header is included in the output.

FALSE

--delimiter

d

The delimiter character used to delineate columns in output.

Single characters are specified directly. For a single space, use " " or the keyword space. For a tab, use \t or the keyword tab.

The default value is a comma.

FALSE

--output-crs

c

A string specifying the horizontal coordinate reference system key of the output.

If specified, the data is transformed.

FALSE

--coordinate-format

t

A string specifying the format of the coordinates in the output. One of:

GROUND: Ground

LLDG_DMS: Geographic DMS

LLDG_DMS_NO_FORMAT: Geographic DMS (no formatting)

LLDG_DM: Geographic DM

LLDG_DD: Geographic DD

FALSE

This must be specified explicitly.

--coordinate-precision

e

A number specifying the decimal precision of the coordinates in the output.

The default value is 3.

FALSE

--include-band

b

The name and precision of a band to include in the output.

<Name> - A string specifying the name of the band to include in the output.

<DecimalPrecision> - A number specifying the decimal precision for floating point numeric values in the output.

Include values in the output from the band in the input, using the specified precision. The DecimalPrecision is only used for numeric band types, but must be specified for all band types.

The ALL keyword is used to include all other bands in the output in alphabetical order. If the ALL keyword is used in conjunction with explicit band names, the latter overrides the options specified with the ALL keyword.

TRUE

This must be specified explicitly.

--z-axis-convention

z

A string specifying the output Z-axis convention. One of:

UP: Z axis positive up

DOWN: Z axis positive down

The default value is DOWN.

FALSE

--band-filter

f

A string specifying a filter to apply to input band values.

Supported operators: >, <, =, !=. For example, "Depth > 1".

FALSE

Values assumed to be using positive UP convention.

--sample

s

The sample size with its sampling method.

<SampleSize> - A number specifying the output sample size.

<SampleMethod> - A string specifying the output sampling method. One of:

MIN: Minimum node value which is equivalent to shoalest when Z down convention applied.

MAX: Maximum node value which is equivalent to deepest when Z down convention applied.

The sample size unit must be specified. If the input is a raster, the sample size must be equivalent to or larger than the resolution of the input.

Supported units: cable, ch, cm, fm, ft, in, inm, km, m, mi, mm, nm, usfm, usft, usmi, usnm, usyd, yd.

FALSE

Valid units are Length type units in unitstable.xml.

--elevation-unit

E

A string specifying the unit for output elevation values.

The value is converted to the specified unit.

Supported units: cable, ch, cm, fm, ft, in, inm, km, m, mi, mm, nm, usfm, usft, usmi, usnm, usyd, yd.

The default value is metres.

FALSE

Valid units are Length type units in unitstable.xml.

--coordinate-unit

o

A string specifying the unit for output coordinates.

The value is converted to the specified unit. The unit is only applicable when CoordinateFormat is set to GROUND.

The default value is the unit of the input CRS.

FALSE

--other-unit

x

A string specifying the unit for any other scalar band values.

The value is converted to the specified unit.

Supported units: cable, ch, cm, fm, ft, in, inm, km, m, mi, mm, nm, usfm, usft, usmi, usnm, usyd, yd.

The default value is metres.

FALSE

Valid units are Length type units in unitstable.xml.

To use this command refer to the following example.

Example

Objective

You want to export a raster surface to an ASCII file.

Description

Command Line Syntax

The first line of the file will contain a header.

--include-header

Depth band values will be exported with 5 decimal places and Shoal band values will be exported with 2 decimal values.

--include-band Depth 5 --include-band Shoal 2

A filter will be applied to the output so that only points with a Shoal band value with a depth of less than 20 metres will be saved.

--band-filter "Shoal<20"

The coordinate format will be Geographic DMS.

--coordinate-format LLDG_DMS

The source surface is Surface5.csar located in the D:\BatchSample directory.

D:\BatchSample\Surface5.csar

The output ASCII file will be created in the D:\BatchSample directory and named Shoal20M.

D:\BatchSample\Shoal20M.txt

Command Line

carisbatch --run ExportCoverageToASCII --include-header --include-band Depth 5 ‑‑include-band Shoal 2 ‑‑band-filter "Shoal<20" --coordinate-format LLDG_DMS D:\BatchSample\Surface5.csar D:\BatchSample\Shoal20M.txt

Outcome

A new ASCII file is created in the designated output folder.

Extra Notes

If a colour attribute band is selected for export, the colour values will always export as four separate columns and in the order red, green, blue, alpha.