CARIS Process Designer : CARIS Batch : Feature Editing Processes : Add Geometry Attributes
 

Add Geometry Attributes

The AddGeometryAttributes process adds attributes to existing features containing information about the geometry of the features.

Input

Vector features in a supported format. Supported formats include H2O, HOB, S-57 ENC (000), DES, DGN, DXF, DWG, SHP, GML, KML, MapInfo File, SQLite, GeoPackage, CARIS WKT, LHT, and XML.

Output

Vector features in a supported format. Supported formats include GML, KML, MapInfo File, SQLite, and GeoPackage.

A new file can be created as a duplicate of the input with new attributes for the specified geometry information or the input file can be overwritten with the changes.

Syntax

carisbatch --run AddGeometryAttributes [options] <input> <output>

Options

Long

Short

Description

Can Repeat

Notes

--feature-catalogue

i

A string specifying the name of the catalogue that defines the features and attributes in the 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".

This option is only required when the input is a HOB file.

FALSE

--area

 

If set, the horizontal area is added as an attribute.

The attribute name is AREA.

This attribute is only added to area features.

FALSE

--perimeter

 

If set, the horizontal perimeter is added as an attribute.

The attribute name is PERIMETER.

This attribute is only added to area features.

FALSE

--centroid

 

If set, the X, Y, Longitude, Latitude, and Z are added as attributes.

The attribute names are CENT_X, CENT_Y, CENT_LON, CENT_LAT, and CENT_Z.

Only the attributes that are applicable to area features will be added. If the data is not projected, the X and Y attributes are not added. If there is no third dimension value, the Z attribute is not added.

FALSE

--length

 

If set, the horizontal length is added as an attribute.

The attribute name is LENGTH.

This attribute is only added to line features.

FALSE

--begin

 

If set, the X, Y, Longitude, Latitude, and Z are added as attributes.

The attribute names are BEGIN_X, BEGIN_Y, BEGIN_LON, BEGIN_LAT, and BEGIN_Z.

Only the attributes that are applicable to line features are added. If the data is not projected, the X and Y attributes are not added. If there is no third dimension value, the Z attribute is not added.

FALSE

--end

 

If set, the X, Y, Longitude, Latitude, and Z are added as attributes.

The attribute names are END_X, END_Y, END_LON, END_LAT, and END_Z.

Only the attributes that are applicable to line features are added. If the data is not projected, the X and Y attributes are not added. If there is no third dimension value, the Z attribute is not added.

FALSE

--middle

 

If set, the X, Y, Longitude, Latitude, and Z are added as attributes.

The attribute names are MID_X, MID_Y, MID_LON, MID_LAT, MID_Z.

Only the attributes that are applicable to line features are added. If the data is not projected, the X and Y attributes are not added. If there is no third dimension value, the Z attribute is not added.

FALSE

--cover

 

If set, the minimum and maximum X, Y, Longitude, Latitude, and Z are added as attributes.

The attribute names are MIN_X, MIN_Y, MIN_LON, MIN_LAT, MIN_Z, MAX_X, MAX_Y, MAX_LON, MAX_LAT, MAX_Z.

Only the attributes that are applicable to area and line features will be added. If the data is not projected, the X and Y attributes are not added. If there is no third dimension value, the Z attribute is not added.

FALSE

--point-count

 

If set, the point count is added as an attribute.

The attribute name is PT_COUNT.

This attribute is only added to line, area, and multi-point features.

FALSE

--point

 

If set, X, Y, Longitude, Latitude, and Z are added as attributes.

The attribute names are X, Y, LON, LAT, Z.

Only the attributes that are applicable to point features will be added. If the data is not projected, the X and Y attributes are not added. If there is no third dimension value, the Z attribute is not added.

FALSE

Examples

To use this command refer to the following example.

Example

Objective

You want to convert S-57 features to GeoPackage format with added geometry attributes.

Description

Command Line Syntax

The horizontal area values of area features are to be added.

--point

The X, Y, Longitude, Latitude, and Z values of point features are to be added.

--area

The input features are using the "S-57 ENC 3.1" catalogue.

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

The features to be updated are in the Input.hob file located in D:\SampleData.

D:\SampleData\Input.hob

The updated features will be saved as Output.gpkg in the source directory.

D:\SampleData\Output.gpkg

Command Line

carisbatch --run AddGeometryAttributes --point --area --feature-catalogue "S-57 ENC 3.1" D:\SampleData\Input.hob D:\SampleData\Output.gpkg

Outcome

The features are saved as a GeoPackage file with attributes added for AREA, X, Y, LON, LAT, and Z as appropriate.

Extra Notes

N/A