Import a city model (CityGML)
What is imported
Buildings from a CityGML city model are added to the Revit project as DirectShapes — one set per building, one DirectShape per component class (wall, roof, ground, vegetation). Material, function, storey count, and other AdV metadata are passed along as shared parameters.
Accepted source formats
- CityGML 2.0 (
.gml,.xml) in AdV-conformant LoD1 or LoD2 profile. - Both OGC EPSG URN (
urn:ogc:def:crs:EPSG::25832) and AdV URN (urn:adv:crs:ETRS89_UTM32*DE_DHHN2016_NH) are accepted as CRS declaration.
LoD3 (façade detail) and LoD4 (interior) are not imported by default — available on request for specific use cases (support@lichtbus.de).
Anatomy of a geoportal file
AdV-conformant filenames follow this pattern:
LoD{detail level}_{UTM zone}_{East-LL in km}_{North-LL in km}_{tile size in km}_{state}.gml
Example:
LoD2_32_664_5650_2_TH.gml
└──┘└┘ └─┘ └──┘ └┘ └┘
LoD2 Z32 East North 2km Thuringia
Content of a typical LoD2 file: a <core:CityModel> root element with bounding envelope (CRS via srsName attribute) and a series of <bldg:Building> elements per building. Per the AdV standard, each building carries among others:
- Identification:
gml:id(e.g.DETHL51P0000qOkG), external reference block with the AdV object ID - Date:
creationDate - Function:
function(encoded AdV object code, e.g. 31001 = residential, 51001 = garage) - Height:
measuredHeight(in metres, ground to roof top) - Storeys:
storeysAboveGround - Roof shape:
roofType(encoded: 1000 = flat roof, 3100 = saddle roof, 3200 = hip roof, …)
These AdV fields are mapped to identically-named shared parameters that are visible in the Revit project and queryable in schedules.
Workflow
- Preparation — download the city model from the geoportal. Common detail level: LoD2 (roof shapes present).
- Click "CityGML" in the ribbon.
- Select file.
- Georeferencing dialog — see Before the first import.
- Polygon filter (optional) — see Define polygon filter. Acts at building level: only buildings whose XY bounding-box centre lies inside the polygon are imported.
- Material mapping — see next section.
- Result — DirectShapes per building × component class; the TaskDialog reports the number of buildings, DirectShapes created, and materials.
Material mapping
The dialog Material Mapping — CityGML asks for one Revit material per bucket. Three modes are available for how the buckets are formed:
Per class (default, Free + Pro)
One bucket per CityGML component class — the typical AdV LoD2 classes:
| Class | What it is |
|---|---|
| WallSurface | Exterior walls |
| RoofSurface | Roof faces |
| GroundSurface | Ground surface beneath the building |
| ClosureSurface | Closed openings (e.g. recessed windows in LoD2) |
| Vegetation | Vegetation objects (trees, bushes) |
Per function (Pro)
Buckets by AdV building function: a separate material set for residential buildings (function = 31001), another for garages (51001), agricultural buildings (51010), etc. The AdV code is auto-resolved to a plain-text name when present.
Per storey (Pro)
Buckets by storey count: single-family materials for 1–2-storey buildings, others for multi-family ≥ 3 storeys, etc. Reads the storeysAboveGround field.
The chosen settings are persisted as a project-wide default. On the next CityGML import into the same Revit project, the selection fields are pre-filled.
Change material mapping later
The ribbon button Materials… lets you reopen the material mapping of an already imported CityGML scene without re-reading the source file. The dialog shows the existing mapping, lets you change individual buckets, and updates the Material attribute on all DirectShapes of the import. Geometry is rebuilt with the persisted import offset, polygon filter, and UTM prefix shift — placement and filtering remain identical to the original import.
In the Free edition retroactive material reassignment is not available; the material choice happens at import time.
Material on individual surfaces (Pro, ribbon button "Material on selection…")
In addition to bucket-wide mapping, Pro lets you assign a different material to individual surfaces that overrides the bucket default — e.g. a single gable wall in exposed concrete while the rest of the stock stays rendered.
- Select surfaces — click the CityGML DirectShapes in the view (or pre-select them), then Esc / Finish.
- Pick a material per bucket — the dialog groups the selection by bucket (class × subkey) and shows how many surfaces in how many buckets are affected.
- Scope — either only the selected surfaces or all surfaces in the affected buckets.
- "[Use bucket default]" removes an existing override again.
Overrides are stored in the project (ExtensibleStorage) and reapplied on the next Materials… run — a material refresh therefore does not wipe them. Because the surface material is baked into the geometry, the affected geometry is rebuilt when overrides are applied (delete + rebuild).
Import multiple tiles (Pro)
Pro accepts a multi-selection and imports all selected LoD2 tiles in one run. Free imports one file per click.
Pro vs. Free for CityGML
| Feature | Free | Pro |
|---|---|---|
| Import LoD1 + LoD2 | ✓ | ✓ |
| Polygon filter | ✓ (max. 4 lines) | ✓ |
| Material mapping per class | ✓ | ✓ |
| Material mapping per function / per storey | — | ✓ |
| Change materials later (Materials…) | — | ✓ |
| Material on individual surfaces (override) | — | ✓ |
| Multi-tile in one run | — | ✓ |
| AdV metadata as shared parameters | ✓ | ✓ |
| CRS reprojection | — | ✓ |
| Drift detection on re-import | — | ✓ |
Notes
- Volume of large city models — a city with > 5,000 buildings in LoD2 produces a corresponding number of DirectShapes. Suggestion: apply a polygon filter to the area of interest before importing.
- "BRep face cannot be created" for individual special-construction buildings — occasionally city models contain topologically defective building geometries (self-intersecting faces, invalid winding). GeoBridge catches these and produces a simplified replacement; a corresponding counter line appears in the TaskDialog. The result is topologically sound but visually less detailed than the original might suggest.
- House numbers — are not included in AdV LoD2 data. To add house numbers, import them separately via GeoShape using an ALKIS
.shpfile or its GeoJSON equivalent.