The DeleteFeatures process deletes features in the output that have the same primary key as features in the input. By default, a feature object ID (FOID) is used as the primary key, but an attribute value can also be used.
The process uses a one-to-one match between feature identifiers or attributes. DeleteFeatures will fail with a many-to-one or a one-to-many match.
This process cannot delete collection objects. |
Input
Shapefile, GML file, HOB file, H2O file, S-57 file, HPD database URI, or an oracle simple feature table
Output
An existing HOB file, H2O file, or HPD database URI. The HPD URI must specify the project to use and either a usage or a product to update.
Only users with the following roles can run this process if the output is an HPD URI:
• Product Editor
• Paper Chart Editor
• QA (self-check)
Process models
When an HPD URI is specified for update, DeleteFeatures only queries features from HPD that are specified by the MatchBy option. If the output of DeleteFeatures is passed to another process in a process model, features are not queried from HPD by the next process. Only features that have been marked for deletion can be provided by DeleteFeatures when an HPD URI is specified for update.
Syntax
carisbatch --run DeleteFeatures [options] <input> <output>
Options
Option | Key | Description | Can Repeat | Notes |
|---|---|---|---|---|
--match-by | -m | The primary key. By default, this is the feature object ID but an attribute acronym can also be used. The process deletes features in the output that have the same primary keys as the input features. | FALSE | Optional |
--proposed-deletion | -P | A flag to indicate that features are marked for deletion rather than actually deleted. This option is for formats that support proposed deletion, such as HPD features. | FALSE | Optional |
--input-crs | P | The horizontal coordinate reference system key of the input. This option is only used when the input is a generic Oracle feature table that does not have a registered coordinate reference system. | FALSE | Optional |
Examples
Example | ||
Objective | Mark features in an HPD usage for deletion that match the sor_id value in the LIGHTS.shp file. | |
Description | Command Line Syntax | |
Input file | LIGHTS.shp | |
HPD URI | hpd://username:password@OracleDB/db?UsageId=5;ProjectId=3 | |
Primary key | sor_id | |
Command Line | carisbatch --run DeleteFeatures --proposed-deletion --match-by sor_id D:\LIGHTS.shp hpd://username:password@OracleDB/db?UsageId=5;ProjectId=3 | |
Result | The features in the HPD usage that match features with the same | |
Example | ||
Objective | Delete the features that exist in the input file from the output file. | |
Description | Command Line Syntax | |
Input file | D:\FeaturesToDelete.h2o | |
Output file | d:\FileToUpdate.h2o | |
Command Line | carisbatch --run DeleteFeatures D:\FeaturesToDelete.h2o D:\FileToUpdate.h2o | |
Result | Features in the output file that match features in the input file are deleted. | |