CARIS HIPS and SIPS : CARIS Batch Utility : Feature Editing Processes : Clip Features
 

Clip Features

Description

The ClipFeatures process removes the portions of the input features that are outside the boundaries of a specified clipper. A clipper is defined by one or more polygons.

This process is intended to work with a clipper having edges that follow constant latitude or longitude - that is, edges that are aligned with the X/Y axis of the data.

The ClipFeatures process performs the opposite task the EraseFeatures process performs.

Inputs

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

Outputs

Features in HOB or H2O format.

If the output directory already contains a file with the specified file name, the existing file will be overwritten by the new output file.

Command Line Syntax

carisbatch --run ClipFeatures --feature-catalogue <value> --clipper <value> [options] <input> <output>

User Interface Command

Copy to Clip Layer

Options

The following table describes the parameters available for this process.

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

FALSE

This must be specified for HOB input.

--clipper

C

The path to a HOB or H2O file containing the polygons to use for clipping.

Currently the clipper may be represented by one or more area features in a specified HOB or H2O file.

Clipper area objects can also include interior boundaries. The interior boundaries will affect how features are clipped - the parts of features inside the interior boundaries will be removed as well as the parts of features outside the exterior boundary.

If an empty file is specified, it will be interpreted as "no clipping required" and the output will contain all features in the input.

Lines and points in the given file will be ignored.

FALSE

This must be specified explicitly.

--mark-closing-edges

c

If set, marks closing edges, as required by S-57, to indicate that area features have been truncated by the data limit.

Edges are added to areas that are trimmed by the process to create closed areas. Flagging an added edge as closing indicates that the edge represents a dataset limit, such as an S-57 cell border. If the removal of the data is part of a multi-stage replacement operation, the closing flag should not be set as these edges will not be closing edges after the new data is added.

Edges marked as closing are masked and not symbolized when the area boundary is being drawn.

FALSE

Example

To use this command refer to the following example.

Example

Objective

You want to apply clipping to features in a dataset.

Description

Command Line Syntax

The output layer is using the S-57 ENC 3.1 catalogue.

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

The file containing the clipper polygons is named Clipper.hob and can be found in the BatchSample folder on the D: drive.

--clipper D:\BatchSample\Clipper.hob

Closing edges are to be flagged.

--mark-closing-edges

The input file is named InputFeatures.hob and is in the BatchSample folder on the D: drive.

D:\BatchSample\InputFeatures.hob

The output file will be named ClippedFeatures.hob and will be created in the source directory.

D:\BatchSample\ClippedFeatures.hob

Command Line

carisbatch --run ClipFeatures --feature-catalogue "S-57 ENC 3.1" --clipper D:\BatchSample\Clipper.hob --mark-closing-edges D:\BatchSample\InputFeatures.hob D:\BatchSample\ClippedFeatures.hob

Outcome

The polygon features in the clipper file are applied to the source data and the clipped features are saved to the new hob file in the specified location.

Extra Notes