Import 3d buildings into Cesium

I have many buildings in CityGML format. Currently cesium does not parse citygml. I tried Geojson and KML formats as in Cesium official tutorials using Sandcastle. In geojson buildings can be seen only 2d (as footprints) and in kml experience Cesium gives an error “Unsupported geometry type: model”. I want to render both 3d geometries and semantic attributes in Cesium. I have approximately 2000 buildings. So, What is the best and easiest way to visualize buildings and their attributes in Cesium? I want to develop a client application both visualize buildings and query their semantic attribute.


Sorry, but I don’t know of any tools pubically available to process CityGML into a format that Cesium can render. Converting CityGML to 3D Tiles would be your best solution. You can learn more about the 3D tiles format in this post:

CityGML processing is also something we are looking into adding support for in our new application. Learn more information at



What about parsing kml model geometry and convert it to cesium object? Current KMLDataSource does not support it

KML converter / parser would be good idea.

I wanted to load 3D KML file also in Cesium just like it’s done here:

I have to find out how the people from Munich did incorporate this KML into Cesium. Till now it’s a bit difficult to find out. Would be nice if this can be done with a widget alike…

Keep you posted for my idea’s / solution.

I am also looking for a way to convert from CityGML to 3d-tiles … The problem is not the conversion, is to generate the tileset.json file automatically. I hope the cesium team is working on something. I think the link you’ve been shared is done with this (3DCityDB-Web-Map-Client), if you try it, I’d like to know your opinion about the tool.


we have a CityGML to 3DTiles converter which is commercially available. - Here is an application with an example Dataset from our converter.

If you need more information you can just contact me.


I've been looking at converting kml geometry models into czml models using the libraries I have.
Since kml models are collada and czml are glTF, the first step would be to convert using:

I wrote a few lines of code to pick the kml models info and convert to czml packets.
This works (I think) however, there are some issues like:

the kml scale is in x,y,z direction, but czml is just one number, which one to pick?
the orientation in czml uses UnitQuaternion, how to get this from the kml tilt,roll,heading?

Is anyone still interested in such conversion? If so, are there any simple example kml files around with some geometry models in it for testing?

Hi there,

I don’t know of any KML example files our team uses, but as for your two issues,

  1. CZML scale does take three parameters, in the form of a Cartesian3:

  2. HeadingPitchRoll can be converted to a Quaternion with Quaternion.fromHeadingPitchRoll():

Keep an eye on the Documentation as you work! We have a lot of helpful workhorse functions like that on in our core Cesium library.

Hope that helps,

  • Rachel

Hi Rachel,

Re: czml scale, I was extracting the kml model scale [x,y,z] and using this to set
the czml model scale value, which takes only 1 number. But I can see that
there is a scaling factor of Cartesian3. It is not clear to me where it should be used.
Also not sure which one the czml model will use.

I did eventually see the fromHeadingPitchRoll function, which I use in my code now.

I have a test app that converts kml models from a kml document, to czml models at:
Although not really needed by Cesium users, I also have a KmlToGeojson converter at:

Hi there,

Thanks for sharing your work!

As for the scale property, I realized that that doc page is actually misleading – you’re right, we actually only support uniform scaling for CZML/entities right now. We have an open issue for non-uniform scale right now – we’ll keep you posted if we make any progress.


  • Rachel