I’ve got a bunch of kml - some of it’s pretty large - and i’m interested in knowing the fastest loading format so I can convert it to the right one.
I know the kml data source loader pretty well and have fiddled with it for a variety of reasons. Seems the extra step or parsing and placing cesium calls to install it is a pretty large overhead - at least if looks that way when I profile it. I spend 60 to 90 seconds in that processing structure which locks up the earth while it’s executing.
geoJSON isn’t an option because there’s so much that it doesn’t provide.
Is czml the way to go and does anyone have benchmarks showing that it really is faster and if so by how much?
Finally, is there are more native format I should be looking at?
Thanks, I agree. For very large datasets, 3D tiles is usually the way to go. You can read more about the format here: https://groups.google.com/d/msg/cesium-dev/tCCooBxpZFU/7hxT_E4pGgAJ
CZML should also have better performance than KML (I don’t have stats on this, sorry) and is useful if you have time dynamic data
CZML also allows you to load smaller packets of data into a single data source, which is useful due to JavaScript’s single-threaded nature. By loading small pieces one at a time you can keep the application more interactive while data loads in, basically doing your own cooperative multi-tasking.
My typical kml is typically 10 to 20K placemarks for points, lines, and polygons so it’s not tiles. It takes quite a while to parse that kind of kml and create all the entities with styling and such. I can see the calls in the profiler. I do have some that are overlays and tiling works very well for that. If I’ missing something relative to tiles point me in the right direction and i’m off folks.
Always good to have your input. So your take is czml will load faster than kml - which make sense to me.
I’m going to convert the kml to czml and then run them both so i’ll have performance numbers i’ll post.
Is there an online converter? I’m the the process is setting up the czml converter but if there’s an online converter i can get numbers pretty quickly and know i’m headed in the right direction.
Stupid question - documentation on czml-writer is a bit confusing. Will this convert kl to czml? Looks like there’s info the dotnet version is a standalone app that will do this but not the java.
The czml-writer no longer has a KML converter. It never really worked properly, and has long since been superseded by native KML support in Cesium.
If all you have as input is KML files, then simply loading those KML files is the best you can do. If your KML are generated from some kind of database or data files, then you could consider generating CZML instead, using the writer library.
I can write the php to convert it. Maybe i’ll have to.
Quesiton - the GE plugin had an ability to write the document back out to a string. I haven’t seen anything like that in cesium - that is - ability to write out a datasource. Given i’m a lazy engineer that would be a useful thing in general and solve my bproblem here. That is, if you could take a data source and spit it back as loadable czml.
That’s an honest estimate without fiddling to make it look good. I will say there are features in czml that will probably drop it a lot more when I use them. Primarily the abiulity to use availablity on the positions - that alone will cut the file load by 2/3.
I’ll provide an update.
Do you have a pointer to how to implement streaming on czml file. That’s my next step.