Questions tagged [czml]

Cesium Language (CZML) is a JSON format for describing a time-dynamic graphical scene, primarily for display in a web browser running Cesium. It describes lines, points, billboards, models, and other graphical primitives, and specifies how they change with time.

Cesium Language (CZML)

CZML is a JSON format for describing a time-dynamic graphical scene, primarily for display in a web browser running Cesium. It describes lines, points, billboards, models, and other graphical primitives, and specifies how they change with time. In many ways, the relationship between Cesium and CZML is similar to the relationship between Google Earth and KML. Both CZML and KML are data formats for describing scenes in their respective clients and are meant to be generated by a wide variety of applications.

  1. CZML is based on JSON.
  2. CZML can accurately describe properties that change over time.
  3. CZML is structured for efficient, incremental streaming to a client.
  4. CZML is optimized for client consumption.
  5. CZML is extensible.
  6. CZML is an open format.

CZML is a subset of JSON, meaning that a valid CZML document is also a valid JSON document. Specifically, a CZML document contains a single JSON array where each object-literal element in the array is a CZML Packet. A CZML packet describes the graphical properties for a single object in the scene, such as a single aircraft.

Examples

Note: javascript comments in this example are for illustration purposes even though comments are not technically allowed in JSON.

[
    // packet one
    {
        "id": "GroundControlStation"
        "position": { "cartographicDegrees": [-75.5, 40.0, 0.0] },
        "point": {
            "color": { "rgba": [0, 0, 255, 255] },
        }
    },
    // packet two
    {
        "id": "PredatorUAV",
        // ...
    }
]

There are additional examples online.

Demos

Cesium ships with several CZML demos.

References

51 questions
7
votes
2 answers

How can I create a moving line between two entities in CesiumJS?

I have two entities on my page; a satellite and its "ground position", both of which move as time passes in Cesium. I'd like to connect the two with a straight line that moves with them. The CZML Showcase seems to demonstrate similar functionality…
Brian Putnam
  • 599
  • 1
  • 5
  • 12
6
votes
2 answers

Cesium - Using scaleByDistance for a billboard created through CZML

I am trying to show an icon as a billboard and scale it by distance. I can manage fine, but as soon as I load the billboard through CZML instead of directly in JS, I cannot get the billboard the resize. In my JS file I have: var czmlDataSource = new…
5
votes
4 answers

CESIUM : How to animate an aircraft from pitch, roll, heading?

I have flight data containing position (lat,lon,height) and orientation (pitch, roll, heading) in function of time. I would like to represent the aircraft in CesiumJS. I tried to create CZML file from the flight data. Everything worked fine for the…
Florent Du
  • 81
  • 1
  • 5
5
votes
1 answer

How to update polygon material if I know Id of polygon?

I am loading a CZML file in cesium. And want to highlight multiple polygons (like myid_1, myid_2, myid_3) if polygon with id as "myid" is clicked. But I am unable to process it as I am not getting the entity objects of other polygons to process its…
meen
  • 2,287
  • 3
  • 23
  • 42
5
votes
2 answers

Cesium CZML: using lat long alt

I imagine this is a simple problem for anyone really familiar with Cesium's CZML files. I'm just trying to display a series of lat/long/alt points as a flight path using Cesium. Can someone tell me what the "position" tag should look like? Unless…
Noise in the street
  • 589
  • 1
  • 6
  • 20
5
votes
2 answers

How to correctly use unitQuaternion czml property in Cesium

I use the gltf branch of Cesium, and I want to display 3d model of planes. To do that I create czmlDataSource that I load and add to dataSources. The problem is that I can't figure out how to calculate orientation quaternion to have planes parallel…
typedef
  • 1,159
  • 1
  • 6
  • 11
4
votes
1 answer

track pedestrian with trail using cesium CZML

Does someone have a handy example of a CZML file that uses sample properties to track a pedestrian walking a terrain. I need a billboard at the head of the trail for the person, who will have some custome properties I want to see in the infoblock…
Dr.YSG
  • 7,171
  • 22
  • 81
  • 139
4
votes
1 answer

Manipulate CZML fill property of polygon dynamically

Can properties of entities drawn in CZML be manipulated? I am trying to toggle fill property of a group of polygons at a time. I have added parent property. But it doesn't seem to work. Anyone has faced this issue before? Any help is much…
meen
  • 2,287
  • 3
  • 23
  • 42
4
votes
1 answer

Cesium czml change orientation of 3d model (gltf/glb) along with position in time

I have implemented a 3d model (cesium air) aircraft to move along a path. Its position is being changed based on time and the detailed data is available in the czml file under position attribute. However, I am not able to change the orientation of…
4
votes
1 answer

How to access entities in CzmlDataSource after loading

I want to access to some entities in my czml data source for keep tracking in the viewer but after the loading, as one of the options for camera. I know that I can access entities in my czml file while I am loading them, but I don't know how I can…
azar
  • 283
  • 3
  • 21
4
votes
2 answers

Cesium: streaming example of CZML

It looks like this question has been asked before but I have been unable to find a proper example. I am familiar with PHP, but new to Javascript, and cannot figure out how to stream CZML. I want to show about 6.500 assets on a map. To prevent the…
4
votes
3 answers

How to draw custom dynamic billboards in Cesium.js

I'm currently using Cesium for a mapping application, and I have a requirement to have status indicators for each item I'm plotting (for example, if the item I'm plotting is an airplane, then I need to have a fuel status indicator). I can't use…
user990522
  • 105
  • 2
  • 8
3
votes
2 answers

How do I convert a geodetic location to an ECF position that works with the terrain model in Cesium

I'm trying to put a point at the top of Mount Everest in Cesium. My most likely candidate as of last night was the code I borrowed to do geodetic to ecef conversion (from PySatel.coord). Upon review this morning, it appears to be correct: a =…
Carl F.
  • 6,718
  • 3
  • 28
  • 41
2
votes
1 answer

Cesium CZML Model: is it possible to define multiple clock intervals?

In a Cesium CZML Model, I'd like to define multiple clocks, each one with its own time interval and multiplier, something like: clock: { interval: "2019-06-01T16:00:00Z/2019-06-01T16:10:00Z", currentTime: "2019-06-01T16:00:00Z", …
2
votes
1 answer

Creating and loading big 3D objects into Cesium

I'm trying to create and load 3D objects into Cesium. I need to create these objects programmatically (by using some import-transformation service, .NET platform used) from various sources I have experience of doing it in THREEJS. I read DXF file,…
SalientBrain
  • 2,431
  • 16
  • 18
1
2 3 4