CARIS Process Designer : CARIS Batch : Feature Editing Processes : Dissolve Features
 

Dissolve Features

Description

The DissolveFeatures process removes the common boundaries between areas and the common nodes between lines in the input and saves the results to the output.

For Areas:

Adjacent areas that share common edges are merged.

By default, only matching areas are dissolved. Areas are matching if they have the same feature code, attribute values and belong to the same collections. Note that this is equivalent to the Edit > Areas > Merge Matching command in the desktop application.

Alternatively, if the DissolveIntoFeatureCode option is used, areas will be merged into areas with the specified feature code. The feature code value differs for each format; for HOB and S-57 .000, the feature object acronym is used; for S-100 the feature code is used; for GML, the Feature Type is used. Note that this is equivalent to the Edit > Areas > Merge Into command in the desktop application.

The DissolveIntoFeatureCode option will have no effect when used with Shapefile data as each file contains only a single feature code.

For Lines:

Lines that share common nodes (that is, end points) are merged.

Only matching lines are dissolved. Lines are matching if they have the same feature code, attribute values and belong to the same collections. Note that this is equivalent to the Edit > Lines > Merge Matching command in the desktop application.

The FilterFile and PrimitiveType options may be used to select the features to dissolve. If both options are used, features must be selected by the FilterFile option and the PrimitiveType option can be used to select candidates for dissolving.

This process replaces the Dissolve Area Features process.

Input

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

Note that Shapefiles must be in CARIS Shapefile Format and use a recognized Shapefile Coordinate Reference System. An SHP_RXL or PRJ file must also be available.

Output

Features in HOB format. The same HOB file can be both input and output. If the output HOB file already exists, it is overwritten.

Command Line Syntax

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

User Interface Command

Merge Matching Areas

Merge Areas Into

Merge Matching Lines

Options

The following table describes the parameters available for this process.

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

See Catalogues for a list of default catalogues.

FALSE

This must be specified for HOB input.

--filter-file

-L

The path to a CQL FILTER file containing rules for selecting the features to be dissolved. For example, a rule can be set to merge DRGARE or DEPARE areas where DRVAL1 =0 AND DRVAL2 = 3

Rules that do not apply to the input are skipped without error.

If a file is not specified, all areas and lines are selected.

The option can be combined with the --primitive-type option for more precise results.

FALSE

Optional

--dissolve-into-feature-code

-d

The feature code for the areas that other areas are to be dissolved into.

Areas with a different feature code than the specified feature code will be merged into areas having the specified feature code.

For example, if this option is set to DRGARE, then other area features that pass the filter, such as DEPARE, merge into neighbouring DRGARE features.

This option is only available for areas.

FALSE

Optional

--primitive-type

-P

The primitive type for selecting the features to dissolve. One of:

AREA

LINE

If this option is not set, then all areas and lines are selected.

This option can be combined with the --filter-file option for more precise results.

Note that the --filter-file option can be used to select lines and areas but is catalogue specific - all features codes must be specified in the filter file along with a primitive type to select all lines or areas. This option allows the filter file to be used without having to specify the primitive type.

FALSE

Optional

Example

To use this process, refer to the following example.

Example

Objective

Dissolve DEPARE feature in ca573359.000 into UNSARE features and save the output to ca573359.hob.

Description

Command Line Syntax

Feature catalogue for output file.

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

Filter file for selecting DEPARE and UNSARE features.

--filter-file DEPARE_UNSARE.filter

Dissolve neighbouring features into UNSARE features.

--dissolve-into-feature-code UNSARE

Path of the input file.

D:\ca573359.000

Path of the output file.

D:\ca573359.hob

Command Line

carisbatch -r DissolveFeatures --feature-catalogue "S-57 ENC 3.1" --filter-file DEPARE_UNSARE.filter --dissolve-into-feature-code UNSARE D:\ca573359.000 D:\ca573359.hob