Description
The ExportFeatures process exports features to files in a specified format.
Inputs
Features in a supported format, HOB, H2O, 000 (S-57 or S-101 specification) and HPD URIs are supported.
Outputs
File or folder of files, depending on the specified output format:
• GeoJSON: Output is a folder. One GeoJSON file is created for each distinct feature class found in the input.
• GeoPackage: Output is a file.
• Shapefile: Output is a folder. One Shapefile is created for each distinct feature class and primitive type (line, point, area, etc.) found in the input.
Command Line Syntax
carisbatch --run ExportFeatures --output-format <value> [options] <input> <output>
User Interface Command
Export Selection to GeoPackage/SQLite
Options
Parameter |
| |||
|---|---|---|---|---|
Long | Short | Description | Can Repeat | Notes |
--output-format | -O | A string specifying the format in which the output is generated. Can be one of: • GEOJSON: Export features to files in GeoJSON file format. • GEOPACKAGE: Export features to a file in GeoPackage format. • SHAPEFILE: Export features to files in Shapefile format. | FALSE | Required except when exporting to Shapefile. In this case, an output format is not required when used in a process model where the output is chained as the input to another process. |
--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 the 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 only. |
--choice-attribute-format | -C | A string specifying the format to be used for choice type attributes. One of {NAME, VALUE, VALUE(NAME)}: • NAME: Choice type attributes are exported using the name portion of the enumerated value. • VALUE: Choice type attributes are exported using the value portion of the enumerated value. • VALUE(NAME): Choice type attributes are exported using both the value and name using the Value (Name) syntax. Default is NAME to retain the existing behaviour. | FALSE | This must be specified for GeoPackage output only. Choice type attributes include enumerated and list type attributes. |
--file-prefix | -P | A string prefixed to filenames for Shapefile output. This prefix is added to all of the created files. | FALSE | This must be specified for Shapefile output only. |
Example
Example | ||
|---|---|---|
Objective | Export a HOB file to the GeoJSON format. | |
Description | Command Line Syntax | |
Output format is GeoJSON. | --output-format GEOJSON | |
Input has features and attributes defined in the S-57 ENC 3.1 feature catalogue. | --feature-catalogue "S-57 ENC 3.1" | |
Input HOB file is named ca753369.hob and located at D:\Sample, | D:\Sample\ca753369.hob | |
Output files will be placed in the existing folder SampleOutputFolder on D. | D:\SampleOutputFolder | |
Command Line | carisbatch --run ExportFeatures --output-format GEOJSON --feature-catalogue "S-57 ENC 3.1" D:\Sample\ca753369.hob D:\SampleOutputFolder | |
Outcome | A GeoJSON for each of the feature types in the input HOB is created in the designated folder. | |
Example | ||
|---|---|---|
Objective | Export a HOB file to the Shapefile format. | |
Description | Command Line Syntax | |
Output format is Shapefile. | --output-format SHAPEFILE | |
Input has features and attributes defined in the S-57 ENC 3.1 feature catalogue. | --feature-catalogue "S-57 ENC 3.1" | |
Shapefile output files will have the prefix "Poly" added to the filenames. | --file-prefix Poly | |
Input HOB file is named polygon.hob and located at D:\BatchSample. | D:\BatchSample\polygon.hob | |
Output files will be placed in an existing folder called FeatureToShape located at D:\BatchSample. | D:\BatchSample\FeatureToShape | |
Command Line |
| |
Outcome | A shapefile for each of the feature types in the input HOB is created in the designated folder. | |