Skip to content

IFCTerrain Command

Marcus Schroeder edited this page Sep 28, 2021 · 38 revisions

As an alternative to the graphical user interface, it is possible to use the IFCTerrainCommand.exe for generating terrain models in IFC format. For that, a .json file is required, that contains the information that is required to run the application. You can use this for batch processing!


Table of contents


JSON-Settings

The json attributes to convert a dtm are listed below. These are divided into: file unspecific and file specific attributes.

Keep in mind!: Upper and lower case must be observed!

Attributes (file unspecific)

attribute value range description
filePath [obligatory] valid file path [string] Path of the input file
fileName [obligatory] valid file name [string] Filename of the input file (without file extension)
fileType [obligatory] DXF (0), LandXML (1), CityGML (2), Grafbat (3), PostGIS (4), Grid (5), REB (6), GeoJSON (7) [string OR (integer)] File format of the input file
destFileName [obligatory] valid file path [string] Path and filename of the output file
outIFCType [optional] IFC2x3 (0); IFC4 (1); [string OR (integer)] Sets the IFC version of the output file
outFileType [optional] Step (0); ifcXML (1), ifcZip (2); WKT (17); WKB (18)
[string OR integer]
Sets the file format of the output file. Step --> *.ifc; ifcXML --> *.ifcxml, ifcZip ---> *.zip (contains the *.ifc file)
outSurfaceType [obligatory] GCS (0); SBSM (1); TFS (2)
[string OR (integer)]
Sets the terrain model type for the output IFC file: GCS=GeometricCurveSet; SBSM=ShellBasesSurfaceModel; TFS=TriangulatedFaceSet
geoElement [optional] true; false Setting, that decides whether the output IFC file should contain an IfcGeographicElement of the terrain or not
Metaddata - Below settings for 'general' metadata
siteName [optional] string The title of the dtm in the ouput IFC file
projectName [optional] string The project name in the output IFC file
editorsFamilyName [optional] string The editors family name in the output IFC file
editorsGivenName [optional] string The editors given name in the output IFC file
editorsOrganisationName [optional] string The editors organization name in the output IFC file
exportMetadataFile [optional] true; false Decide whether metadata should be exported as a separate JSON file
outIfcPropertySet [optional] true; false Decide whether metadata should be stored in the exported IFC file as IfcPropertySet
exportMetadataDin91391 [optional] true; false Decide whether metadata (according to DIN SPEC 91391-2) should be exported (Condition: need to be given as seperate file or input via GUI)
exportMetadataDin18740 [optional] true; false Decide whether metadata (according to DIN 18740-6) should be exported (Condition: need to be given as seperate file or input via GUI)
Logging - Below the required parameters to write a log file!
logFilePath [obligatory] string Storage destination for the log file. Hint: The means only the path.
Hint: The file name is assigned by IfcTerrain!
verbosityLevel [optional] verbose (0), debug (1), info (2), warning (3), error (4) [string OR integer] Setting of user defined verbosity Level.

Attributes (Georeferencing)

attribute value range description
logeoref [obligatory] 30/40/50 [integer] Decides which level to use. Depending on this, different parameters are to be assigned! The number stands for a level. For more background information: Georeferencing
customOrigin [optional] true; false Describes whether the project coordinate origin should be set to the user defined position or not. If this is not the case, the following three lines are not necessary!
xOrigin [obligatory - customOrigin = true] double The x component of the custom origin. This value will be ignored, if you set "customOrigin" to false!
yOrigin [obligatory - customOrigin = true] double The y component of the custom origin. This value will be ignored, if you set "customOrigin" to false!
zOrigin [obligatory - customOrigin = true] double The z component of the custom origin. This value will be ignored, if you set "customOrigin" to false!
trueNorth [optional] double Rotation against true north.
Level 50 - Below the required or possible attributes for Level 50
scale [optional] double Scale number of a projected coordinate reference system
crsName [optional] string Name of the CRS (EPSG-Code)
crsDescription [optional] string Description to the CRS.
geodeticDatum [optional] string Name of the geodetic datum
verticalDatum [optional] string Name of the vertical datum
projectionName [optional] string Name of the projection name
projectionZone [optional] string Name of the projection zone

Attributes (file specific)

The attributes of the respective file format are to be added. (All other attributes can be omitted)

Drawing Interchange File Format (DXF)

Sample dataset:

attribute vale range description
layer [obligatory] string Name of the layer that contains terrain information in an input DXF file
breakline [optional] true; false Decides whether break edges are to be processed (true). If this is not the case, the following line is not necessary!
breakline_layer [optional] string Name of the layer that contains the breakline. (only one layer is allowed)
readPoints [optional] true; false Decide that only the Points / Coordinates will be read. A delaunay triangulation will be calculated!

LandXML (xml)

Sample dataset:

attribute vale range description
invertedCRS [optional] true; false Decide if CRS is: right handed (XYZ)[FALSE]; left handed (YXZ) [TRUE]

CityGML (gml)

Sample dataset:

REB (DA45, DA49, DA58)

Sample dataset: REB file | config

attribute vale range description
horizon [obligatory] integer Number of the horizon that contains terrain information
invertedCRS [optional] true; false Decide if CRS is: right handed (XYZ)[FALSE]; left handed (YXZ) [TRUE]

GRAFBAT (GEOgraf A³)

Sample dataset:

attribute vale range description
onlyHorizon [optional] true; false Decides whether all horizons (=false) or only selected ones (=true) are to be used. If filtering is to be used, the entry must be made via "horizonFilter".
filterPoints [optional] true; false Decides wheter that a filtering via horizon should be enabled.
horizonFilter [optional] string Input only if "filterPoints" is true. Designation of specific horizons. Separation via: "/" ";" "," permissible
breakline [optional] true; false Decides whether break edges are to be processed (true). If this is not the case, the following line is not necessary!
breakline_layer [optional] string Name of the layer that contains the breakline. (only one layer is allowed)
readPoints [optional] true; false Decide that only the Points / Coordinates will be read. A delaunay triangulation will be calculated!

OGC - PostGIS

attribute value range description
host [obligatory] string Link to the host database
port [obligatory] integer Specifying the port for the database connection
user [obligatory] string Specification of the user name for authentication with the database
pwd [obligatory] string Specification of the password for authentication with the database
database [obligatory] string Target database
schema [obligatory] string Target schema
tin_table [obligatory] string Specify the table that contains the TIN
tin_column [obligatory] string Specify the column that contains the geometry of the TIN
tinid_column [obligatory] sting Specify the column that contains the ID of the TIN
tin_id [obligatory] integer Specification of a TIN ID to be read out
breakline [optional] true; false Decides whether break edges are to be processed (true). If this is not the case, the following lines are not necessary!
breakline_table [optional] string Specify the table that contains the geometry of the break lines
breakline_column [optional] string Specify the column that contains the geometry of the break lines
breakline_tin_id [optional] string Specify the column that contains the TIN ID !Not to be confused with "tin_id".
readPoints [optional] true; false Decide that only the Points / Coordinates will be read. A delaunay triangulation will be calculated!
queryString [optional] string Custom string to query TIN data from a database
breaklineQueryString [optional] string Custom string to query breakline data from a database

Elevation Grid

Sample dataset:

attribute value range description
bBox [optional] true; false Decides on the use of the BoundingBox. If the BoundingBox is to be used (true), the following fields must be provided with values.
bbP1X, bbP1Y, bbP2X, bbP2Y [optional] double Values of BoundingBox. P1 - Point in North East & P2 in South West
invertedCRS [optional] true; false Decide if CRS is: right handed (XYZ)[FALSE]; left handed (YXZ) [TRUE]

GeoJSON

Sample dataset:

attribute value range description
geometryType [obligatory] MultiPoint (1); MultiPolygon (2); GeometryCollection (3) [string OR (integer)] Set the geometry type which will be used in the file.

Testing software for developer [not up to date]

The windows-batch program is a executive testing software. It reads from the IFCTerrainTestData the config data ([...]) and is exporting the results of the test data to the export folder ([...]). This folder will be opened automatically. It creates test IFC-data for:

  • TIN (LandXML, CityGML)
  • CAD (DXF)
  • GRID (XYZ)
  • REB (DA45, DA49, DA58)
  • GEOgraf (OUT)
  • GeoJSON (JSON)
  • Database (PostGIS) (currently not available)
Clone this wiki locally