将三维建筑导出为 CityGML——OGC 制定的三维城市模型标准。采用 XML 格式,支持 LOD 1(块状建筑模型)。用于城市规划、GIS 分析与城市管理。
OpenStreetMap data as of 26 October 2026 · 16 days ago
主要特点

关于 CityGML 格式
CityGML is an OGC standard for semantic 3D city models. It differs from an ordinary 3D mesh in that a building here is not just a set of triangles but an object with meaning: it has walls, a roof, a height, a floor count and a function. That is exactly why the format took root in urban planning and city computations rather than in visualization.
A map is exported to CityGML when a 3D city is needed for analysis: calculating insolation and solar panel potential, modeling noise, assessing density and building volumes, loading into a city database. Such tasks need attributes, not a pretty picture.
The output is a single CityGML 2.0 XML file: buildings at LOD1 detail, that is, as closed volumes extruded from OSM outlines by height or floor count, with correctly oriented floor, wall and roof faces. Every building records its measured height, the number of floors and a function code derived from OSM tags. Coordinates are WGS84 (EPSG:4326) by default, and the coordinate system is stated in the file itself.
Pitched roofs, facade details and interior rooms are absent from LOD1 by definition — this is the level of boxes. More detailed models require source data that simply does not exist in OpenStreetMap.
打开 CityGML 文件的程序
以下程序可以打开、编辑和处理从 OSM2CDR 导出的 CityGML (OGC 3D City Model)(.gml)文件:
格式规格
- 开放标准
- 支持 3D 坐标
- 无损(无质量损失)
- 存储要素属性
- 输出:1 个文件
- CityGML 2.0 (OGC 12-019). XML-based 3D city model standard; buildings as LOD 1 solids. Opens in FZK Viewer, FME, QGIS. Where elevation data (DEM) covers the area, buildings and the ground follow the terrain; without it the ground stays at z = 0. A bare surface is the separate Terrain Mesh format.
谁在使用 CityGML 地图
如何导出 CityGML
导出后如何打开
- FZK Viewer (free) — open the file and make sure the model reads and the attributes are in place; a convenient first check before loading it anywhere.
- 3DCityDB — import through the Importer/Exporter into PostgreSQL with PostGIS, after which the city is available through ordinary SQL queries.
- FME — transformation and conversion: CityGML is easily turned into CityJSON, IFC or shapefiles to match the requirements of a particular project.
- citygml-tools (free, command line) — validation of the file and conversion into CityJSON, if the receiving side expects JSON.
- QGIS and ArcGIS Pro — read CityGML for checking and for showing it together with other city layers.
导出 CityGML (OGC 3D City Model) 地图
从 OpenStreetMap 下载专业的 CityGML 地图。任意区域,付款前即可看到价格。
常见问题
相关格式
经常一起导出
Related Articles
CityGML — OGC XML Standard for 3D City Models with LOD0-LOD4 Detail Levels
CityGML is an OGC standard based on GML 3.2.1 for 3D city models: 5 detail levels (LOD0-LOD4), ADE extensions; used by B
guide3D Tiles and CityGML: OGC Standards for Smart Cities
Digital city twins using 3D Tiles and CityGML. LOD levels, Cesium visualization, and applications in urban planning and
usecaseCityJSON and Digital City Twins: From OSM to Smart City
CityJSON for 3D city models, LOD levels, BIM integration, applications in Smart City projects and urban planning.