KML Rendering

Hello,

In the FAQ it is stated that Cesium supports ’ good bit of KML’
I cannot find an example for it, Also I cannot find what subset of KML
is supported

Thanks for your support

Hi Christian,

We have an open-source KML to CZML converter in the czml-writer project (instructions). You can convert KML files to CZML, and then drag and drop them into Cesium Viewer. I don’t know all of the details off-hand, but we support major features like placemarks, polylines, polygons, and text. We do not support 3D models yet, but we recently started working on them.

What KML features are you most interested in?

Regards,

Patrick

I am most interested in real-time KML network links.

Most government agencies offer live kml links to storm updates, weather, and the like.

Example here: http://climateviewer.com/earth/

Any plans for a real-time file conversion server? Ideally you could write a server app that would do real-time translation of json, xml, kml to czml.

Yes, I agree. First class (or close to) KML support would make cesium very attractive as an alternative to Google Earth. The current "convert to czml" is not adequate seeing as CZML is immature and scarcely documented while lacking many of the robust features of KML (like NetworkLinks).

I am most interested in real-time KML network links.

Most government agencies offer live kml links to storm updates, weather, and the like.
Example here: http://climateviewer.com/earth/

Any plans for a real-time file conversion server? Ideally you could write a server app that would do real-time translation of json, xml, kml to czml.

On Friday, November 16, 2012 7:22:54 PM UTC-5, Patrick Cozzi wrote:Hi Christian,

We have an open-source KML to CZML converter in the czml-writer project (instructions). You can convert KML files to CZML, and then drag and drop them into Cesium Viewer. I don't know all of the details off-hand, but we support major features like placemarks, polylines, polygons, and text. We do not support 3D models yet, but we recently started working on them.

What KML features are you most interested in?

Regards,
Patrick

Hello,

In the FAQ it is stated that Cesium supports ' good bit of KML'
I cannot find an example for it, Also I cannot find what subset of KML

is supported

Yes, I agree. First class (or close to) KML support would make cesium very attractive as an alternative to
Google Earth. The current "convert to czml" is not adequate seeing as CZML is immature and scarcely
documented while lacking many of the robust features of KML

I 'kind of' agree here but I see GeoJson as the more likely candidate
to include
in cesium core

(like NetworkLinks).

Network links as a google extension (patent pending!) are not part of the OGC
specification

Rationale: Most providers that can produce KML can produce GeoJson as well.
KML and GeoJson both have a plethora of readers and writers implemented.
It is pretty easy to implement a KML to GeoJson converter in (allmost) any
programming language, so to implement a web service to convert KML ->
GeoJson is easy enough (and only has to be done for the rare cases that
the service in question does not provide GeoJson ootb). A KML -> CZML
converter has to be written from scratch (exception is java of course)
and has not the comfort of using tried, tested and trusted libraries

GeoJson is much closer to CZML, so the implementation would probably
be leaner than KML.

Any plans for a real-time file conversion server? Ideally you could write a server app that would do real-time translation of json, xml, kml to czml.

Yes, the plan is to expose a web service that converts KML and other formats to CZML. This service will be called when a user drags and drops a KML file onto the Cesium globe, so from the user’s perspective KML and other formats just work. We actually had this at one point, but I believe it was just a prototype. We’ll see what it will take to bring it back.

Regards,

Patrick

A couple things to add on to this. We’re planning on supporting kml network links in the near term. We started work on this in the badly named czmlLayers branch( I named it). The czml equivalent is called external links. We’re still trying to figure out all the details we want to support(ie time dynamic external links?) When this branch is brought into master we also plan on adding the web service that Patrick mentioned to allow for converting the network links on the fly(along with all the other kml elements we already support).

We’re also working on adding a czml output plugin to geoserver so that any data that resides there can be converted and used in Cesium.

I just looked at GeoJSON and it does make sense to include a converter for this. Do you have suggestions/ideas on this? How would you like to see it implemented? Would you like to help?

if you’re intersted in the geoserver work, you can find it here https://github.com/AnalyticalGraphicsInc/geoserver/tree/czmlOutput. This has also waiting on the czmlLayers branch to be finished.

Thanks for the updates. I am working with several partners to create a new system to assimilate various data sources and display them on a 2D and 3D map. I full intend to integrate Cesium into our new website, however I want to include all previous data from ClimateViewer 3D http://climateviewer.com/earth/ in the new version. We intended to use Open Street Maps for the 2D version, however I know that Cesium will have a flat map option, 2 birds 1 stone.

Our wish list is:

  • MUST work on PC, Mac, Linux, Mobile phones, AND tablets.
  • MUST be able to access a database full of KML, XML, RSS, etc which is updated via our timing system. (certain sources will get refreshed more often than others, such as weather alerts, earthquakes)
  • should be as lightweight as possible, mobile internet is notoriously slow, and devices are as well.
  • possibly create a slim-line version that initially loads, and dependent on load time then loads the rest of the full feature set. (this can also be toggled, full/mini)
    I don’t ask for much… =) I am 100% behind your work, I shopped every open source globe out there, and yours stands far above the rest, including Google Earth. Keep the updates coming, I can barely wait to convert to Cesium.

Here is a sneak peak of our new project, which will include Cesium…

Hi,

Just a heads up that Android support for WebGL, and thus Cesium, is up and coming, but still not production-ready. See our page on mobile. iOS still doesn’t have WebGL support for all users (just iAds developers), but we expect that to change eventually.

Regards,

Patrick

Christian,

With regards to your original question:

In the FAQ it is stated that Cesium supports ’ good bit of KML’
I cannot find an example for it, Also I cannot find what subset of KML
is supported

There is a page with the details - Home · AnalyticalGraphicsInc/czml-writer Wiki · GitHub

Regards,

Patrick

Thanks so much for the Android support. Device support is one of the first things my users and our public users ask for, so this is great progress.

Hey Matt - just to jump in on the Network KML support: this is massive for us - let's just say you're currently supporting our "Santa Tracker" mission right now and we've just started playing with Cesium for other mission sets. The most important data feed we push out lives on a Network KML.

While we do publish out a JSON for this data, most of our consumers view the data in GE, which, in some places, poses a problem for install, admin, DAA restrictions, etc.

Cesium could be huge for us in this regard (well, at least another viewer we can push anywhere)

here’s another possible path to getting KML into CZML. i haven’t tested it yet but it might give some ideas.

using ogr2ogr:

ogr2ogr -f GeoJSON output.geojson input.kml -nln merge -append

then somehow transform output.geojson into CZML (both are JSON). (“merge” and “append” seem to flatten the layers into a single layer that GeoJSON requires…)

btw - i can’t seem to find how GeoJSON or CZML can support “ground overlays” which can contain raster/bitmap images mapped to certain regions, useful for things like satellite imagery. certain KML files use it

thanks!

Thanks for bringing ogr2ogr to our attention; I was not aware of it. I think the problem with converting to GeoJSON as an intermediate step is GeoJSON cannot represent everything that KML can so I suspect parts of the KML file would be lost.

As for ground overlays in CZML, checkout Polygon.Material.Image on the CZML Content page.

Regards,

Patrick