Import configuration
The configuration settings for the import
command are divided into "importOptions"
for general import
settings and "readOptions"
for input file settings and format-specific options.
Tip
The names and purposes of the JSON properties align closely with their counterparts in the command-line options. Where applicable, the description of each JSON property links to the command-line option for more details.
Import options¶
The example below illustrates the JSON structure for the import options.
{
"importOptions": {
"mode": "importAll",
"numberOfThreads": 4,
"batchSize": 20,
"tempDirectory": "/my/path/to/temp",
"affineTransform": [0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0],
"lineage": "myLineage",
"updatingPerson": "myUpdatingUser",
"reasonForUpdate": "myReasonForUpdate",
"filterOptions": {...}
}
}
General import options¶
Property |
Description | Default value |
---|---|---|
"mode" |
Import mode: importAll , skipExisting , deleteExisting , terminateExisting . |
importAll |
"numberOfThreads" |
Number of threads to use for parallel processing. | |
"batchSize" |
Number of top-level features that are committed to the database in a single transaction. A higher batch size might improve import performance but requires more memory. | 20 |
"tempDirectory" |
Store temporary files in this directory. | |
"affineTransform" |
Transform coordinates using a 3x4 matrix in row-major order. The matrix coefficients are represented as array. | |
"lineage" |
Lineage to use for the features. | |
"updatingPerson" |
Name of the user responsible for the import. | database user |
"reasonForUpdate" |
Reason for importing the data. |
Filter options¶
The "filterOptions"
property is a container object for the following filtering options.
{
"filterOptions": {
"featureTypes": [ // (1)!
{
"name": "bldg:Building"
},
{
"name": "Road",
"namespace": "http://3dcitydb.org/3dcitydb/building/5.0"
}
],
"ids": ["foo","bar"],
"bbox": {
"coordinates": [10.0,10.0,20.0,20.0],
"srs": { // (2)!
"srid": 4326,
"identifier": "http://www.opengis.net/def/crs/EPSG/0/4326"
}
},
"bboxMode": "intersects",
"countLimit": {
"limit": 1000,
"startIndex": 20
}
}
}
- The
"name"
property is mandatory. To avoid ambiguity, use the format"prefix:name"
with a namespace alias as prefix or specify the full namespace using the"namespace"
property. - Use either
"srid"
,"identifier"
, or both to define the target CRS.
Property |
Description | Default value |
---|---|---|
"featureTypes" |
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 as prefix or specify the full namespace using the "namespace" property. |
|
"ids" |
Array of identifiers defining the features to process. | |
"bbox" |
Defines a 2D bounding box as a spatial filter using a "coordinates" array for the lower-left and upper-right corners. If the coordinates differ from the 3DCityDB CRS, a different "srs" can be specified with "srid" or "identifier" property. |
|
"bboxMode" |
Bounding box mode: intersects , contains , onTile . |
intersects |
"countLimit" |
The "limit" property sets the maximum number of features to import, and the "startIndex" property defines the 0 -based index of the first feature to import. |
Read options¶
The JSON structure for storing read options is shown below. Format-specific settings are provided within the
"formatOptions"
container object, with the input format name used as the key for the corresponding settings.
Tip
You only need to provide format-specific options for the file formats that match your input files.
{
"readOptions": {
"failFast": false,
"numberOfThreads": 4,
"encoding": "UTF-8",
"tempDirectory": "/path/to/temp",
"computeEnvelopes": true,
"formatOptions": {
"CityGML": {...},
"CityJSON": {...}
}
}
}
General read options¶
Property | Description | Default value |
---|---|---|
"failFast" |
Fail fast on errors. | false |
"numberOfThreads" |
Number of threads to use for parallel processing. | |
"encoding" |
Encoding of input file(s). | |
"tempDirectory" |
Store temporary files in this directory. | |
"computeEnvelopes" |
Compute and overwrite extents of features. | false |
CityGML options¶
The "CityGML"
property is a container object for CityGML-specific format options.
{
"CityGML": {
"includeXALSource": false,
"xslTransforms": [
"/path/to/myFirstStylesheet.xsl",
"/path/to/mySecondStylesheet.xsl"
],
"appearanceOptions": {
"readAppearances": true,
"themes": ["foo","bar"]
},
"useLod4AsLod3": false,
"mapLod0RoofEdge": false,
"mapLod1MultiSurfaces": false,
"createCityObjectRelations": true,
"resolveCrossLodReferences": true
}
}
Property |
Description | Default value |
---|---|---|
"includeXALSource" |
Import XML snippets of xAL address elements. | false |
"xslTransforms" |
An array of XSLT stylesheets to transform the input, referenced by filename and path (absolute or relative). The stylesheets are applied in the specified order. | |
"appearanceOptions" |
The "themes" array restricts the import of appearances based on their <theme> property. To exclude all appearances, set the "readAppearances" property to false (default: true ). |
|
"useLod4AsLod3" |
Use LoD4 as LoD3, replacing an existing LoD3. | false |
"mapLod0RoofEdge" |
Map LoD0 roof edges onto roof surfaces. | false |
"mapLod1MultiSurfaces" |
Map LoD1 multi-surfaces onto generic thematic surfaces. | false |
"createCityObjectRelations" |
Create CityObjectRelation objects for geometry references between top-level features. |
true |
"resolveCrossLodReferences" |
Resolves geometry references between different LoD represenations of the same feature. | true |
CityJSON options¶
The "CityJSON"
property is a container object for CityJSON-specific format options.
{
"CityJSON": {
"mapUnsupportedTypesToGenerics": true,
"appearanceOptions": {
"readAppearances": true,
"themes": ["foo","bar"]
}
}
}
Property |
Description | Default value |
---|---|---|
"mapUnsupportedTypes |
Map city objects from unsupported extensions onto generic city objects. | true |
"appearanceOptions" |
The "themes" array restricts the import of appearances based on their "theme" property. To exclude all appearances, set the "readAppearances" property to false (default: true ). |