Formatted CZML examples

Hi everyone,

We’ve been having troubles properly formatting a CZML file for use in CesiumJS. This CZML would be hosted on Ion, loaded with this example dataset from our vehicle (in this instance, an underwater ROV).

We want to be able to display current sensor data as a billboard above the ROV as it moves along the recorded path, but have been struggling with how to properly format the CZML for visualization of these time-synchronized data. This includes lat/long, depth, heading, and a variety of sensor data/notes at any one second.

Ideally the model would also be oriented via the heading value so it points in the right direction. Can anyone help with an example of how we could achieve this?

We’ve been using the CZML3 python library for this.

Hi @Jonathan_Fiely, thanks for the question!

I haven’t done any czml generation myself so I can’t help as much on that front but I can show how it’s used in CesiumJS and hopefully that can help guide the generation.

Our Flight Tracker tutorial (sandcastle version with an extra billboard here) shows off how to build what I think you want to achieve more on purely the CesiumJS side.

The CZML path sandcastle shows off how to use purely CZML to draw a path and billboard along a hang-glider’s path over time. I modified this slightly to have a model that is oriented along the path in this sandcastle which I think is closer to what you want. Hopefully that helps guide you?

If you want to set up orientation based on an actual heading value instead of the velocity interpolation between points I believe that’s possible but may require some extra work. I’d check out the CZML spec for orientation.

Lastly I do believe it’s possible to upload referenced models alongside the CZML into ion but someone from the ion team would have to confirm the exact way to do that, @mdc9001 can you confirm?

Hi there,

Thank you so much for your response.

Given that CZML is the specific markup language for Cesium, I do request that you please work with your team to provide a formatted example of a CZML that is optimized to A) work with the data example I loaded (or similar) and B) provide a step-by-step guide on how to access these data if uploaded to Cesium Ion, specifically how to call that asset once uploaded to Cesium Ion.

Hopefully this is a reasonable request given CZML as the officially supported markup language and features with Ion.

We have gone through all the above Cesium sandcastle examples indicated above but they do not address these use-cases (ie, ‘CZML path’ sandcastle uses an embedded call w/o metadata, or call the asset from Ion in JS with as asset ID and associated key set to the proper permissions).

Finally, I am willing to have our data be used directly by Cesium’s team to create this as an example/resource for other users of CesiumJS to view data in this fashion. I imagine that this is a common use-case for how many users of Cesium would use this tool. Here is a model that can be used hosted on our Ion (the duck):
Asset ID
Token for this model only

Looking forward to your reply,

  • J

Hi @Jonathan_Fiely,

Sorry to hear that wasn’t the info you were looking for.

It sounds like a missing piece of the puzzle for here is how to use a Cesium ion asset in a CZML file. Is that correct? If that’s the case, I would say you have two options depending on your needs:

  1. Follow Step 1: Preparing your time-dynamic data from our existing tutorial to upload the entirely payload to Cesium ion
  2. Programmatically set the model at runtime to a Cesium ion asset in your CesiumJS app using IonResource.fromAssetId to get the URL endpoint.

Is there anything else that’s particular unclear? If so, I can document a feature request for more learning material on the subject.

Thank you for your offer to let us use your data as a reference!