KML Rendering

1,901 views
Skip to first unread message

Christian Ledermann

unread,
Nov 16, 2012, 4:34:45 PM11/16/12
to cesiu...@googlegroups.com
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

Patrick Cozzi

unread,
Nov 17, 2012, 12:22:53 AM11/17/12
to cesiu...@googlegroups.com
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


rezn8d

unread,
Nov 19, 2012, 1:29:27 PM11/19/12
to cesiu...@googlegroups.com
I am most interested in real-time KML network links.

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

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.

just...@gmail.com

unread,
Nov 19, 2012, 9:00:14 PM11/19/12
to cesiu...@googlegroups.com
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).

Christian Ledermann

unread,
Nov 20, 2012, 6:09:00 AM11/20/12
to cesiu...@googlegroups.com
On Tue, Nov 20, 2012 at 12:00 AM, <just...@gmail.com> wrote:
> On Monday, November 19, 2012 7:29:28 AM UTC-6, rezn8d wrote:
>> 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
>>
>>
>>
>> On Fri, Nov 16, 2012 at 11:34 AM, Christian Ledermann <christian...@gmail.com> wrote:
>>
>>
>> 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.

--
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 702978914

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>

Patrick Cozzi

unread,
Nov 20, 2012, 4:06:20 PM11/20/12
to cesiu...@googlegroups.com
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


Matthew Ford

unread,
Nov 20, 2012, 4:35:14 PM11/20/12
to cesiu...@googlegroups.com
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?

Matthew Ford

unread,
Nov 20, 2012, 4:37:50 PM11/20/12
to cesiu...@googlegroups.com


On Tuesday, November 20, 2012 11:35:14 AM UTC-5, Matthew Ford wrote:

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. 

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. 

rezn8d

unread,
Nov 26, 2012, 7:21:13 PM11/26/12
to cesiu...@googlegroups.com
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...

Patrick Cozzi

unread,
Nov 27, 2012, 12:40:03 PM11/27/12
to cesiu...@googlegroups.com
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


Patrick Cozzi

unread,
Nov 28, 2012, 12:41:06 PM11/28/12
to cesiu...@googlegroups.com
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


Regards,
Patrick 

Chris Shenton

unread,
Dec 5, 2012, 9:42:35 PM12/5/12
to cesiu...@googlegroups.com


On Tuesday, November 27, 2012 7:40:03 AM UTC-5, Patrick Cozzi wrote:
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.

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.  

chris.m....@gmail.com

unread,
Dec 13, 2012, 3:29:43 PM12/13/12
to cesiu...@googlegroups.com
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)

SeH

unread,
Jan 21, 2013, 7:57:50 PM1/21/13
to cesiu...@googlegroups.com
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!


--



Patrick Cozzi

unread,
Jan 21, 2013, 9:28:02 PM1/21/13
to cesiu...@googlegroups.com
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


Reply all
Reply to author
Forward
0 new messages