# CityGML

**CityGML**（City Geography Markup Language，城市[地理标记语言](https://www.edgepedia.org/zh/geography-markup-language)）是一种面向语义化三维城市与景观模型的开放数据模型和交换格式，由开放地理空间信息联盟（OGC）作为标准发布。它表达城市空间中的相关实体——包括建筑物、道路、铁路、隧道、桥梁、城市设施、水体、植被和地形——不仅表达其形状，还表达其含义。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup> 由于对象同时携带语义与几何信息，同一份文件可以用于太阳能潜力分析、能耗模拟、噪声制图或三维地籍，而不仅仅用于渲染。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup><sup> • </sup><sup>[2](https://www.ogc.org/standards/citygml/)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 面向语义化三维城市模型的OGC开放标准数据模型与交换格式；应用包括BIM集成、智慧城市、三维地籍、自动驾驶和城市数字孪生<sup>[2](https://www.ogc.org/standards/citygml/)</sup> |
| 历史 | 2002年由德国北莱茵-威斯特法伦地理数据基础设施发起，由三维特别兴趣小组（SIG3D）开发；OGC 1.0版于2008年发布，2.0版于2012年4月24日发布，3.0概念模型于2021年发布<sup>[3](https://www.eurosdr.net/research/project/citygml)</sup><sup> • </sup><sup>[4](https://nbn-resolving.org/urn:nbn:de:kobv:517-opus-63656)</sup><sup> • </sup><sup>[5](https://docs.ogc.org/dp/25-032.html)</sup> |
| 细节层次 | CityGML 2.0定义LOD0（2.5维地形模型）至LOD4（室内）；CityGML 3.0保留四个LOD，并将室内表示整合进所有LOD<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup> |
| 编码 | GML/XML（经典）、CityJSON（JSON，体积约为前者六分之一）以及数据库模式；CityGML 3.0标准化的是信息模型，而非单一文件格式<sup>[7](https://www.ogc.org/standards/cityjson/)</sup><sup> • </sup><sup>[2](https://www.ogc.org/standards/citygml/)</sup> |
| 模块 | CityGML 3.0定义17个模块：十一个主题模块（Building、Bridge、Tunnel、Construction、CityFurniture、CityObjectGroup、LandUse、Relief、Transportation、Vegetation、WaterBody）以及Appearance、Dynamizer、Versioning、PointCloud等跨领域模块<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup> |
| 代表性部署 | 日本PLATEAU项目：自2020年起为250多个城市提供CityGML模型和100多个用例，全部为开放数据；150个城市约1800万条建筑数据点<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[8](https://isprs-archives.copernicus.org/articles/XLVIII-4-W7-2023/201/2023/)</sup> |
| 存储 | 开源3DCityDB套件在Oracle Spatial和PostgreSQL上管理大型CityGML数据集，并可导出为KML、COLLADA和glTF<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup> |

## 概述

CityGML文件将城市描述为带类型的对象，每个对象具有语义、三维几何、三维拓扑、外观和时间变化，每个对象都可以在不同细节层次（LOD）上承载多种几何表示。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup> OGC将其描述为城市数字孪生的主要结构，它支撑了大量城市建筑能耗建模（UBEM）项目。<sup>[9](https://www.sciencedirect.com/science/article/pii/S187661021401666X)</sup>

**起源。** 工作始于2002年，由德国北莱茵-威斯特法伦地理数据基础设施（GDI NRW）发起，三维特别兴趣小组（SIG3D）于2002年至2005年间开发了该模型。<sup>[3](https://www.eurosdr.net/research/project/citygml)</sup> SIG3D于2008年向OGC提交了CityGML 1.0，并持续参与CityGML 3.0关键组件的制定工作。<sup>[10](https://www.sig3d.org/en/topics/standardisation)</sup> CityGML 3.0已被采纳为OGC标准。<sup>[2](https://www.ogc.org/standards/citygml/)</sup><sup> • </sup><sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup>

## 数据模型与模块

所有CityGML对象都可以从语义、三维几何、三维拓扑、外观和时间变化等方面进行表达，并在预定义的细节层次中提供室外和室内表示。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup> 概念模型以UML类图配合数据字典的方式规定，并作为多种编码的基础。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup>

CityGML 2.0包含按12个模块组织的类，每个模块在核心模块基础上扩展城市对象分类，如Building、Bridge、Tunnel、WaterBody、CityFurniture、LandUse、Relief和Transportation。<sup>[11](https://iris.polito.it/retrieve/02d259da-17b6-4ef3-befa-f24e038309e7/Transactions%20in%20GIS%20-%202020%20-%20Noardo%20-%20Reference%20study%20of%20CityGML%20software%20support%20The%20GeoBIM%20benchmark%202019%20Part%20II.pdf)</sup> CityGML 3.0将其重组为一个核心模块和16个扩展模块，新增Construction、Dynamizer、Versioning和PointCloud。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup><sup> • </sup><sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup> Dynamizer模块将城市对象属性表示为时间序列，并将其与传感器、传感器数据服务或外部文件关联，动态传感器和模拟数据正是通过这种方式进入静态城市模型。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup>

该模型可通过应用领域扩展（ADE）进行扩展。在CityGML 3.0中，ADE是与平台无关的UML模型，用于扩展概念模型，并可映射到多种目标编码。<sup>[1](https://docs.ogc.org/is/20-010/20-010.html)</sup> 例如，日本PLATEAU项目维护了一个城市规划ADE，在其所有市町村中通用。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup>

## 细节层次

CityGML 2.0定义了五个LOD：<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup>

- **LOD0**，二维半数字地形模型，可在其上叠加航拍影像或地图；对于建筑物，则为带高程的底面轮廓，可选带屋顶边缘。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[12](https://3d.bk.tudelft.nl/hledoux/pdfs/18_bimbook_citygml.pdf)</sup>
- **LOD1**，将底面轮廓拉伸至统一高度生成的块状模型，可从地籍数据或激光扫描自动派生。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[12](https://3d.bk.tudelft.nl/hledoux/pdfs/18_bimbook_citygml.pdf)</sup>
- **LOD2**，具有差异化、概化屋顶结构的模型；是城市中最常用的层级，广泛用于能耗分析、供热需求模拟、太阳能潜力估算、三维噪声制图和光伏分析。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[13](https://www.mdpi.com/2075-5309/13/7/1758)</sup>
- **LOD3**，精细的建筑模型，包含屋顶挑檐、开口和立面细节，通常由BIM转换或地面激光扫描生成。<sup>[12](https://3d.bk.tudelft.nl/hledoux/pdfs/18_bimbook_citygml.pdf)</sup>
- **LOD4**，在LOD3建筑基础上增加房间、家具等室内特征。<sup>[12](https://3d.bk.tudelft.nl/hledoux/pdfs/18_bimbook_citygml.pdf)</sup>

CityGML 3.0取消了LOD4，将室内表示整合进LOD0至LOD3，因此一栋建筑可以组合使用，例如LOD1外壳配LOD2或LOD3室内，或LOD0平面图。Building、Room、TrafficSpace等空间可根据LOD表示为点、多面、实体或多曲线。<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup>

## 版本：2.0与3.0

CityGML 2.0.0于2012年4月24日发布，引入了Bridge和Tunnel模块。<sup>[4](https://nbn-resolving.org/urn:nbn:de:kobv:517-opus-63656)</sup><sup> • </sup><sup>[13](https://www.mdpi.com/2075-5309/13/7/1758)</sup> CityGML 3.0概念模型于2021年发布，随后于2023年发布GML编码规范。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup>

3.0的核心变化是架构性的：早期版本标准化的是GML交换格式，而CityGML 3.0标准化的是底层信息模型，该模型可以用GML/XML、JSON或数据库模式实现。<sup>[2](https://www.ogc.org/standards/citygml/)</sup> 其他改进包括更好地与BIM集成、不同LOD的室内空间、对动态传感器和模拟数据的支持，以及通过模型驱动架构工具处理ADE。<sup>[2](https://www.ogc.org/standards/citygml/)</sup> 此次修订还着眼于与IFC（ISO 16739）、IndoorGML、LADM（ISO 19152）、INSPIRE和RDF/关联数据的互操作性，外部对象引用通过OWL sameAs等关系类型进行限定。<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup>

向后兼容是一项设计要求：所有CityGML 1.0和2.0数据集仅通过语法转换即可转为3.0模型，OGC表示1.0和2.0规范不会被弃用，因为大量使用这些规范的数据集仍在活跃使用中。<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup><sup> • </sup><sup>[2](https://www.ogc.org/standards/citygml/)</sup>

## 相关标准与互操作性

**CityJSON**是一种基于JSON的编码，实现了CityGML 3.0数据模型的一个子集，并带有JSON特有的扩展机制；使用JSON代替GML可将文件压缩约6倍。<sup>[7](https://www.ogc.org/standards/cityjson/)</sup> 它面向程序员以及Web和移动端开发，去掉了旧的LOD4，将坐标参考系统限制为EPSG代码，且每个数据集使用一个CRS。<sup>[14](https://link.springer.com/article/10.1186/s40965-019-0064-0)</sup> citygml4j Java库自2.6.0版起支持CityGML与CityJSON之间的双向自动转换。<sup>[14](https://link.springer.com/article/10.1186/s40965-019-0064-0)</sup> CityJSON逐模块记录其合规性并标明差距，例如仅支持TINRelief/TriangulatedSurface地形表示，不支持CityGML的Versioning模块，对此它计划提供基于Git的替代方案。<sup>[15](https://www.cityjson.org/citygml/v30/)</sup>

**BIM与室内标准。** 3.0修订围绕与IFC、IndoorGML、LADM和INSPIRE的互操作性展开。<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup> 在BIM/GIS文献中，CityGML被称为BIM/GIS集成中研究最多的标准。<sup>[13](https://www.mdpi.com/2075-5309/13/7/1758)</sup>

**工具。** 3DCityDB开源套件在Oracle Spatial和[PostgreSQL](https://www.edgepedia.org/zh/postgresql)上存储和管理大型CityGML数据集，并将对象导出为[KML](https://www.edgepedia.org/zh/keyhole-markup-language)、COLLADA和glTF，以便在[Google Earth](https://www.edgepedia.org/zh/google-earth)、ArcGIS和Cesium虚拟地球等应用中可视化。<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup><sup> • </sup><sup>[12](https://3d.bk.tudelft.nl/hledoux/pdfs/18_bimbook_citygml.pdf)</sup> 支持CityGML 3.0的软件包括FME、deegree、GDAL、GMLAS和SupportGIS，以及citygml4j库和citygml2-to-citygml3转换工具。<sup>[6](https://link.springer.com/article/10.1007/s41064-020-00095-z)</sup>

## 数据一览

对相同数据集比较CityJSON 2.0与CityGML-XML 3.0的文件大小基准显示出一致的压缩效果：3DBAG建筑7.0 MB对40 MB（5.7倍）；纽约某瓦片110 MB对682 MB（6倍）；苏黎世LOD2建筑293 MB对2,100 MB（7倍）；蒙特利尔某瓦片5.6 MB对53 MB（9.5倍）。<sup>[16](https://www.cityjson.org/filesize/)</sup>

欧洲和日本的采用范围广泛。欧洲所有首都城市都提供CityGML模型，德国几乎所有大城市都提供覆盖全境的LOD2模型。<sup>[13](https://www.mdpi.com/2075-5309/13/7/1758)</sup> 日本PLATEAU项目由国土交通省城市局牵头，2020年至2024年间为250多个城市制作了CityGML模型，包含100多个用例，全部为开放数据；尽管日本有1700多个城市，但东京、大阪、札幌等主要城市的覆盖使人口覆盖率超过全国总人口的一半。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup> 150个城市约1800万条建筑数据点已转换为CityGML开放数据。<sup>[8](https://isprs-archives.copernicus.org/articles/XLVIII-4-W7-2023/201/2023/)</sup>

## 应用与实践

已记录的应用包括城市与景观规划、BIM集成、移动通信、灾害管理、三维地籍、旅游、车辆与行人导航以及自动驾驶。<sup>[2](https://www.ogc.org/standards/citygml/)</sup> LOD2城市模型广泛用于能耗分析，包括供热需求模拟、太阳能潜力估算、三维噪声制图和光伏潜力分析。<sup>[13](https://www.mdpi.com/2075-5309/13/7/1758)</sup> 该模型还在荷兰作为交换格式和数据库进行过测试，并作为气候变化研究的模型使用。<sup>[17](https://isprs-archives.copernicus.org/articles/XL-2-W2/19/2013/isprsarchives-XL-2-W2-19-2013.pdf)</sup>

**生产工作流。** [卡尔斯鲁厄](https://www.edgepedia.org/zh/karlsruhe)市自2007年起开发了包含屋顶形态细节的完整三维建筑模型，并选择CityGML作为交换格式；FME工作流将LOD2 CAD建筑数据与存放在[Microsoft Excel](https://www.edgepedia.org/zh/microsoft-excel)和Esri Shape格式中的属性和地址数据结合，输出三种细节程度的模型。<sup>[18](https://www.con-terra.com/sites/default/files/files/pdf/Case%20Studies/Stadt%20Karlsruhe_CityGML_EN.pdf)</sup> PLATEAU在各市町村之间维护兼容的工具链，包括用于质量管理的PLATEAU Flow、用于可视化的PLATEAU VIEW、PLATEAU-GIS-Converter，以及面向Unity和Unreal的PLATEAU SDK。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup>

**规模与性能。** CityGML数据集可能非常庞大，且包含深度嵌套的对象，因此高效存储需要优化的数据库模式和数据访问工具；慕尼黑工业大学的一个研究数据库将CityGML应用模式映射到优化的关系模式，并对CityGML文件采用多线程并行处理。<sup>[19](https://portal.fis.tum.de/en/publications/making-interoperability-persistent-a-3d-geo-database-based-on-cit/)</sup>

## 近期发展

CityGML 3.0的GML编码于2023年发布，工具也随之跟进：citygml4j提供基于CityGML 3.0概念模型的Java类，并带有面向CityGML 3.0、2.0和1.0的GML/XML序列化模块以及CityJSON 2.0、1.1和1.0模块；citygml-tools命令行工具增加了对CityGML 3.0 GML/XML数据集解析和写入的完整支持。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[20](https://github.com/citygml4j/citygml4j/)</sup><sup> • </sup><sup>[21](https://github.com/citygml4j/citygml-tools/blob/master/CHANGELOG.md)</sup>

PLATEAU自2020年启动以来一直基于CityGML 2.0运行，于2025年发布了一份关于CityGML 3.0标准产品规格草案和标准作业流程的技术验证报告，并正在权衡从2.0升级到3.0的转换器以及回退的降级转换器，因为在2.0已够用的情况下迁移动力不足，且城市规划ADE需要修订。<sup>[5](https://docs.ogc.org/dp/25-032.html)</sup><sup> • </sup><sup>[22](https://www.mlit.go.jp/plateau/libraries/technical-reports/)</sup> CityJSON 2.0与CityGML 3.0数据模型对齐，citygml4j的CityJSON模块已支持2.0版。<sup>[7](https://www.ogc.org/standards/cityjson/)</sup><sup> • </sup><sup>[20](https://github.com/citygml4j/citygml4j/)</sup>

## References

1. [OGC City Geography Markup Language (CityGML) Part 1: Conceptual Model Standard (20-010)](https://docs.ogc.org/is/20-010/20-010.html)
2. [CityGML Standard, Open Geospatial Consortium](https://www.ogc.org/standards/citygml/)
3. [CityGML, EuroSDR](https://www.eurosdr.net/research/project/citygml)
4. [CityGML in PostGIS: portability, usage and performance analysis using the example of the 3D City Database of Berlin (dissertation)](https://nbn-resolving.org/urn:nbn:de:kobv:517-opus-63656)
5. [Building an Ecosystem for the Development, Utilization, and Open Data of 3D City Models Based on CityGML (OGC Discussion Paper, PLATEAU)](https://docs.ogc.org/dp/25-032.html)
6. [CityGML 3.0: New Functions Open Up New Applications, PFG (Springer)](https://link.springer.com/article/10.1007/s41064-020-00095-z)
7. [CityJSON Standard, Open Geospatial Consortium](https://www.ogc.org/standards/cityjson/)
8. [Role of 3D City Model Data as Open Digital Commons: A Case Study of Openness in Japan's Digital Twin 'Project PLATEAU', ISPRS Archives](https://isprs-archives.copernicus.org/articles/XLVIII-4-W7-2023/201/2023/)
9. [Assessing Passive and Active Solar Energy Resources in Cities Using 3D City Models, Energy Procedia](https://www.sciencedirect.com/science/article/pii/S187661021401666X)
10. [Standardisation of 3D City Models, SIG3D](https://www.sig3d.org/en/topics/standardisation)
11. [Reference study of CityGML software support: The GeoBIM benchmark 2019, Part II, Transactions in GIS](https://iris.polito.it/retrieve/02d259da-17b6-4ef3-befa-f24e038309e7/Transactions%20in%20GIS%20-%202020%20-%20Noardo%20-%20Reference%20study%20of%20CityGML%20software%20support%20The%20GeoBIM%20benchmark%202019%20Part%20II.pdf)
12. [Modelling cities and landscapes in 3D with CityGML (book chapter, TU Delft)](https://3d.bk.tudelft.nl/hledoux/pdfs/18_bimbook_citygml.pdf)
13. [CityGML in the Integration of BIM and the GIS: Challenges and Opportunities, Buildings (2023)](https://www.mdpi.com/2075-5309/13/7/1758)
14. [CityJSON: a compact and easy-to-use encoding of the CityGML data model, Open Geospatial Data, Software and Standards (Springer)](https://link.springer.com/article/10.1186/s40965-019-0064-0)
15. [CityGML v3.0 implementation details, CityJSON](https://www.cityjson.org/citygml/v30/)
16. [File size comparison: CityJSON v2.0 vs CityGML-XML v3.0, CityJSON](https://www.cityjson.org/filesize/)
17. [Exploring the processes of generating LOD (0-2) CityGML models in Greater Municipality of Istanbul, ISPRS 2013](https://isprs-archives.copernicus.org/articles/XL-2-W2/19/2013/isprsarchives-XL-2-W2-19-2013.pdf)
18. [City of Karlsruhe CityGML case study, con terra](https://www.con-terra.com/sites/default/files/files/pdf/Case%20Studies/Stadt%20Karlsruhe_CityGML_EN.pdf)
19. [Making interoperability persistent: A 3D geo database based on CityGML, TU Munich](https://portal.fis.tum.de/en/publications/making-interoperability-persistent-a-3d-geo-database-based-on-cit/)
20. [citygml4j, Java library for CityGML, GitHub](https://github.com/citygml4j/citygml4j/)
21. [citygml-tools CHANGELOG, GitHub](https://github.com/citygml4j/citygml-tools/blob/master/CHANGELOG.md)
22. [PLATEAU Technical Reports, MLIT](https://www.mlit.go.jp/plateau/libraries/technical-reports/)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 2026*

Topic: 技术与人造世界 › 工程与制造 › 计算机辅助工程与电子设计自动化

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/citygml

English original: https://www.edgepedia.org/citygml
