CARIS Batch Utility : BASE Editor Processes : Smooth Features by Direction Bias
 

Smooth Features by Direction Bias

Description

The SmoothFeaturesByDirectionBias process alters line and area features by applying a direction-biased safe-side smoothing algorithm.

Inputs

Features in a supported format. HOB and 000 (S-57 specification) are supported.

Outputs

Features in HOB format.

Command Line Syntax

carisbatch --run SmoothFeaturesByDirectionBias --feature-catalogue <value> --tolerance <value> [options] <input> <output>

Options

The following table describes the parameters available for this process.

To use this command, refer to the following examples.

Parameter

 

Long

Short

Description

Can Repeat

Notes

 

--feature-catalogue

F

A string specifying the name of the catalogue that defines the features and attributes in a vector dataset. One of {list dynamically populated from the catalogue control file}.

The names of the available catalogues can be accessed through application via the Object Catalogue environment variable in Tools > Options. The available catalogues are controlled by the Catalogue Control file. An example of a catalogue name is "S-57 ENC 3.1".

The units and z-axis direction of the output are controlled by the pool of the feature catalogue of the output. If the input cannot be converted to those units and z-axis convention, then the values are simply copied from the input data.

FALSE

This must be specified explicitly.

--tolerance

T

A number and unit specifying the minimum distance between vertices.

Two components of the smoothing algorithm use this tolerance. Points within this tolerance of each other are collapsed together, resulting in tiny curves becoming sharp angles. In addition, safe-side correction overcompensates to move unsafe components to be Tolerance/2 on the safe sid of the original line.

This value must be greater than zero.

FALSE

This must be specified explicitly.

--maximum-edge

A number and unit specifying the maximum edge length for input features.

If set, edges longer than this value are subdivided before smoothing. Also, if set, this value must be greater than zero.

FALSE

--convergence

A number and unit specifying the minimum smoothing required in each iteration for the process to continue.

If set, smoothing ends if none of the changes in an iteration is larger than this tolerance. This must be a positive value, or zero.

FALSE

--iterations

The number of smoothing iterations applied.

If the convergence limit is met before this number of iterations is run, the operation ends at that time.

This value must be greater than zero.

FALSE

--scale

s

A number speficying the scaling applied to distance values (1:scale).

This is applied to the --tolerance, --maximum-edge, and ‑‑convergence values. The default scale of 1 requires those values to be entered as distances on the ground. A scale of 1000 means these values are distances on a 1:1000 scale map.

A scale of 1 and tolerance of 1m is identical to a scale of 1000 and a tolerance of 1mm.

This value must be greater than zero.

FALSE

--direction-bias

The rules applied when smoothing features.

<SlopeDirection> A string describing the rule to use for lines with contour slope attribution.

DOWN: Lines are smoothed towards lower elevation.

UP: Lines are smoothed towards higher elevation.

<Unknown> A string describing the rule to use for lines without contour slope attribution.

LEFT: Lines are smoothed towards the left.

RIGHT: Lines are smoothed towards the right.

IGNORE: Unattributed lines are ignored.

Contours will only have the contour slope (cntdir) attribute if they were generated using the Bathy DataBASE catalogue.

Note: Because the process does not know which attributes are present in the input data, you must specify a direction for contours both with and without the slope attribute.

FALSE

Example: Bathy DataBASE Catalogue

Example

Objective

You want to smooth a selection of contours generated using the Bathy DataBASE catalogue.

Description

Command Line Syntax

The contours were generated using the Bathy DataBASE catalogue.

--feature-catalogue "Bathy DataBASE"

Vertices are to be no less than 1m apart.

--tolerance 1m

Edges in the selected features are to be no longer than 3m.

--maximum-edge 5m

Smoothing will end once points are being moved less than 0.5m.

--convergence 0.5m

Points will be smoothed towards the lower elevation.

--direction-bias DOWN RIGHT

The source features are stored in Contours.hob and are located in the D:\BatchSample directory.

D:\BatchSample\Contours.hob

The new smoothed features will be saved to SmoothedContours.hob in the same directory as the source.

D:\BatchSample\SmoothedContours.hob

Command Line

carisbatch --run SmoothFeaturesByDirectionBias --feature-catalogue "Bathy DataBASE" --tolerance 1m --maximum-edge 5m --convergence 0.5m --direction-bias DOWN RIGHT D:\BatchSample\Contours.hob D:\BatchSample\SmoothedContours.hob

Outcome

The contour line and depth area features are smoothed using a lower-elevation bias and saved to the specified location.

Extra Notes

N/A

Example: S-57 Catalogue

Example

Objective

You want to smooth a selection of contours generated using the S-57 ENC 3.1 catalogue.

Description

Command Line Syntax

The contours were generated using the S-57 ENC 3.1 catalogue.

--feature-catalogue "S-57 ENC 3.1"

Vertices are to be no less than 1m apart.

--tolerance 1m

Edges in the selected features are to be no longer than 3m.

--maximum-edge 5m

Smoothing will end once points are being moved less than 0.5m.

--convergance 0.5m

Points will be smoothed towards the right of the source feature.

--direction-bias DOWN RIGHT

The source features are stored in S57Contours.hob and are located in the D:\BatchSample directory.

D:\BatchSample\S57Contours.hob

The new smoothed features will be saved to S57SmoothedContours.hob in the same directory as the source.

D:\BatchSample\S57SmoothedContours.hob

Command Line

carisbatch --run SmoothFeaturesByDirectionBias --feature-catalogue "S-57 ENC 3.1" --tolerance 1m --maximum-edge 5m --convergance 0.5m --direction-bias DOWN RIGHT D:\BatchSample\S57Contours.hob D:\BatchSample\S57SmoothedContours.hob

Outcome

The contour line and depth area features are smoothed to the right of the source feature and saved to the specified location.

Extra Notes

N/A