|
| 1 | +--- |
| 2 | +title: Delete configuration |
| 3 | +description: Description of the JSON delete configuration |
| 4 | +tags: |
| 5 | + - citydb-tool |
| 6 | + - delete |
| 7 | + - config |
| 8 | +--- |
| 9 | + |
| 10 | +The configuration settings for the `delete` command are shown below. |
| 11 | + |
| 12 | +!!! tip |
| 13 | + The names and purposes of the JSON properties align closely with their counterparts in the command-line options. Where |
| 14 | + applicable, the description of each JSON property links to the command-line option for more details. |
| 15 | + |
| 16 | +```json |
| 17 | +{ |
| 18 | + "deleteOptions": { |
| 19 | + "mode": "terminate", |
| 20 | + "terminateWithSubFeatures": true, |
| 21 | + "terminationDate": "2018-07-01T00:00:00", |
| 22 | + "lineage": "myLineage", |
| 23 | + "updatingPerson": "myUpdatingPerson", |
| 24 | + "reasonForUpdate": "myReasonForUpdate", |
| 25 | + "query": {...}, |
| 26 | + "validityOptions": {...} |
| 27 | + } |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +## General delete options |
| 32 | + |
| 33 | +| <div style="width:130px;">Property</div> | Description | Default value | |
| 34 | +|-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|---------------| |
| 35 | +| [`"mode"`](delete.md#delete-mode) | Delete mode: `delete`, `terminate`. | `terminate` | |
| 36 | +| [<code>"terminateWithSub<br/>Features"</code>](delete.md#delete-mode) | Also terminate sub-features. | `true` | |
| 37 | +| [`"terminationDate"`](delete.md#defining-termination-metadata) | Time in `<YYYY-MM-DD>` or <code><YYYY-MM-DDThh:mm:ss[(+|-)hh:mm]></code> format to use as termination date. | `now` | |
| 38 | +| [`"lineage"`](delete.md#defining-termination-metadata) | Lineage to use for the features. | | |
| 39 | +| [`"updatingPerson"`](delete.md#defining-termination-metadata) | Name of the user responsible for the import. | database user | |
| 40 | +| [`"reasonForUpdate"`](delete.md#defining-termination-metadata) | Reason for importing the data. | | |
| 41 | + |
| 42 | +## Query options |
| 43 | + |
| 44 | +The `"query"` property is a container object for the following query and filtering options. |
| 45 | + |
| 46 | +```json |
| 47 | +{ |
| 48 | + "query": { |
| 49 | + "featureTypes": [ // (1)! |
| 50 | + { |
| 51 | + "name": "bldg:Building" |
| 52 | + }, |
| 53 | + { |
| 54 | + "name": "Road", |
| 55 | + "namespace": "http://3dcitydb.org/3dcitydb/transportation/5.0" |
| 56 | + } |
| 57 | + ], |
| 58 | + "filter": { |
| 59 | + "op": "s_intersects", |
| 60 | + "args": [ |
| 61 | + { |
| 62 | + "property": "core:envelope" |
| 63 | + }, |
| 64 | + { |
| 65 | + "bbox": [10.0,10.0,20.0,20.0] |
| 66 | + } |
| 67 | + ] |
| 68 | + }, |
| 69 | + "filterSrs": { // (2)! |
| 70 | + "srid": 4326, |
| 71 | + "identifier": "http://www.opengis.net/def/crs/EPSG/0/4326" |
| 72 | + }, |
| 73 | + "countLimit": { |
| 74 | + "limit": 1000, |
| 75 | + "startIndex": 20 |
| 76 | + } |
| 77 | + } |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | +1. The `"name"` property is mandatory. To avoid ambiguity, use the format `"prefix:name"` with a namespace alias as prefix or |
| 82 | + specify the full namespace using the `"namespace"` property. |
| 83 | +2. Use either `"srid"`, `"identifier"`, or both to define the target CRS. |
| 84 | + |
| 85 | +| <div style="width:110px;">Property</div> | Description | Default value | |
| 86 | +|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| |
| 87 | +| [`"featureTypes"`](delete.md#feature-type-filter) | Array of JSON objects specifying the features to process. Each object must include the `"name"` of the feature type. To avoid ambiguity, use the format `"prefix:name"` with a namespace alias or specify the full namespace using the `"namespace"` property. | | |
| 88 | +| [`"filter"`](delete.md#cql2-based-filtering) | A CQL2 filter expression, encoded as [CQL2 text or JSON](cql2.md). | | |
| 89 | +| [`"filterSrs"`](delete.md#cql2-based-filtering) | Specifies a CRS for filter geometries that differs from the 3DCityDB CRS. Use the `"srid"` or `"identifier"` property to define the filter CRS. | | |
| 90 | +| [`"countLimit"`](delete.md#count-filter) | The `"limit"` property sets the maximum number of features to export, and the `"startIndex"` property defines the `0`-based index within the result set to export. | | |
| 91 | + |
| 92 | +## Validity options |
| 93 | + |
| 94 | +The `"validityOptions"` property is a container object for filtering features based on their validity. |
| 95 | + |
| 96 | +```json |
| 97 | +{ |
| 98 | + "validityOptions": { |
| 99 | + "mode": "valid", |
| 100 | + "reference": "database", |
| 101 | + "at": "2018-07-01", |
| 102 | + "lenient": false |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | + |
| 107 | +| Property | Description | Default value | |
| 108 | +|---------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| |
| 109 | +| [`"mode"`](delete.md#deleting-historical-versions) | Process features by validity: `valid`, `invalid`, `all`. | `valid` | |
| 110 | +| [`"at"`](delete.md#deleting-historical-versions) | Check validity at a specific point in time. If provided, the time must be in `<YYYY-MM-DD>` or <code><YYYY-MM-DDThh:mm:ss[(+|-)hh:mm]></code> format. | | |
| 111 | +| [`"reference"`](delete.md#deleting-historical-versions) | Validity time reference: `database`, `realWorld`. | `database` | |
| 112 | +| [`"lenient"`](delete.md#deleting-historical-versions) | Ignore incomplete validity intervals of features. | `false` | |
0 commit comments