Very large KML of lines for roads

I have a very large kml file that displays major roads for country that I need to display. The zipped and formatted kml file is 88MB and 2.8 million lines long, and not surprisingly, it doesn’t load into cesium. :frowning:

How many lines do we expect cesium to be able to render at 30fps? Are there any possible performance enhancements? Could I parse the file myself and stitch the lines together with a series of Entity->Polylines. Are there any other possible solutions? Has anyone else tackled a problem like this? Possibly storing the data, and then creating the lines when the camera is zoomed in to a certain point, kind of a LOD approach?


What is the unzipped size? You can just rename kmz to zip and unpack it to see. The simple truth is that an 88 megabyte zipped KMZ file is going to expand into several hundred megabytes of data (possibly even over a GB because XML is so repetitive) and no web browser is going to let us use that much memory to load it and since it’s all CPU bound in JavaScript, it would take an intractable amount of time. How well does such a file even work inside Google Earth desktop? I imagine it can handle it but performance and memory usage must be pretty large.

The good news is that as part of the work we are doing for and 3D Tiles, we will eventually have a way to convert large KML files like your into a 3D Tiles dataset, at which point supporting this use case will be trivial; but I don’t have an ETA on when KML->3DTiles pipeline will be ready. The Cesium side of things is moving along though and you can see Dan’s pull request here: If you were to generate vector tiles from your data, they would load beatifully in that branch; but that is probably quite involved at this point.

Depending on your timeframe, I expect vector tiles support to be pretty far along within the next 2 months but drag/drop KML -> 3D Tiles support will be several months further out.

The unzipped size is 88Mb. The performance in GE isn’t that great, there are times when the frame rate drops. That’s great news about the upcoming changes. I’ll be looking for any updates.


Are there any updates with respect to supporting these files? I can’t actually give you the contents of the file for testing, but I’d like to see if there’s anything I can do to support these files in the next few months.

Here are the basics of the file:

<?xml version="1.0" encoding="iso-8859-1"?> FF000000 1

Line Features

Line Features

Unknown Line Type


A lot of the files have 100-1000s of the LineStrings listed each with a varying number of coordinates. Is there anything I can do support these kml files now?

We’re currently on v28, but I have v30 locally for testing.