CZML writing : Ellipse position height

Hi,

I am trying to generate some CZML and I don't understand what's wrong with my file.

What I would like to achieve is to print a path (that is ok) and print an ellipse centered on this path.
The ellipse is well placed in latitude and longitude regarding the time, but not in altitude. It stays fixed at 0m of altitude (or the height value if I put one).

I don't understand what's wrong in my CZML file. I pasted it below.

If somebody sees my mistake... :frowning:

[

{
  "id":"document",
  "version":"1.0"
},
{
  "id":"path1",
  "billboard":{
    "image":"point_bleu.png"
  },
  "path":{
    "width":3,
    "resolution":5
  },
  "description":{
    "interval":"2012-04-11T08:34:00Z/2012-04-11T10:05:59Z"
  },
  "availability":"2012-04-11T08:34:00Z/2012-04-11T10:05:59Z",
  "position":{
    "epoch":"2012-04-11T08:48:46Z",
    "cartographicDegrees":[
      0,7.181667,45.957778,85344,
      89,7.01,46.07,92964,
      106,6.924999999999999,46.087,94259.4,
      184,6.51,46.17,100584,
      256,6.64047188,46.38089453,106451.4,
      277,6.679444,46.443889,108204,
      585,5.966406,46.841947,115824.00000000001,
      950,5.097328,47.270783,115824.00000000001,
      1293,4.264722,47.651667,115824.00000000001,
      1424,3.948611,47.796667,115824.00000000001,
      1623,3.702222,48.157222,115824.00000000001,
      1808,3.294786,48.406994,115824.00000000001,
      2043,3.013858,48.844631,115824.00000000001,
      2079,2.960444,48.905889,115824.00000000001,
      2431,2.421417,49.514167,115824.00000000001,
      2680,1.911214,49.881028,115824.00000000001,
      2820,1.517717,49.984867,115824.00000000001,
      3104,0.9293525,50.41341844,113272.824,
      3125,0.885067,50.445675,113080.8,
      3883,-0.1305,51.36,54864.00000000001
    ],
    "referenceFrame":"FIXED"
  }
},
{
  "id":"ellipse1",
  "description":{
    "interval":"2012-04-11T08:34:00Z/2012-04-11T10:05:59Z"
  },
  "availability":"2012-04-11T08:34:00Z/2012-04-11T10:05:59Z",
  "ellipse":{
    "semiMinorAxis":30000,
    "semiMajorAxis":30000,
    "extrudedHeight":30480,
    "rotation":0,
    "material":{
      "solidColor":{
        "color":{
          "rgba":[
            150,30,30,50
          ]
        }
      }
    },
    "outline":true
  },
  "polygon": {
    "perPositionHeight":true
  },
  "position":{
    "reference":"path1#position"
  }
}
]

Hello,

Our geometry height and extruded height conventions need a major overhaul. The current definition is really not intuitive. I have an issue written up here to modify it: https://github.com/AnalyticalGraphicsInc/cesium/issues/2364

Anyway, In order to get the ellipse off the ground, you have to use the ‘height’ property. The ‘height’ property is used to define the height (relative to the globe) one face of the ellipse, and the extrudedHeight is used to defined the height (relative to the globe) of the other face. So in order to get the ellipse off the ground, you have to use intervals for the position, the height, and the extrudedHeight properties.

I’ve updated your example below:

var czml = [{
“id”:“document”,
“version”:“1.0”
},
{
“id”:“path1”,
“billboard”:{
“image”:“point_bleu.png”
},
“path”:{
“width”:3,
“resolution”:5
},
“description”:{
“interval”:“2012-04-11T08:34:00Z/2012-04-11T10:05:59Z”
},
“availability”:“2012-04-11T08:34:00Z/2012-04-11T10:05:59Z”,
“position”:{
“epoch”:“2012-04-11T08:48:46Z”,
“cartographicDegrees”:[
0,7.181667,45.957778,85344,
89,7.01,46.07,92964,
106,6.924999999999999,46.087,94259.4,
184,6.51,46.17,100584,
256,6.64047188,46.38089453,106451.4,
277,6.679444,46.443889,108204,
585,5.966406,46.841947,115824.00000000001,
950,5.097328,47.270783,115824.00000000001,
1293,4.264722,47.651667,115824.00000000001,
1424,3.948611,47.796667,115824.00000000001,
1623,3.702222,48.157222,115824.00000000001,
1808,3.294786,48.406994,115824.00000000001,
2043,3.013858,48.844631,115824.00000000001,
2079,2.960444,48.905889,115824.00000000001,
2431,2.421417,49.514167,115824.00000000001,
2680,1.911214,49.881028,115824.00000000001,
2820,1.517717,49.984867,115824.00000000001,
3104,0.9293525,50.41341844,113272.824,
3125,0.885067,50.445675,113080.8,
3883,-0.1305,51.36,54864.00000000001
],
“referenceFrame”:“FIXED”
}
},
{
“id”:“ellipse1”,
“description”:{
“interval”:“2012-04-11T08:34:00Z/2012-04-11T10:05:59Z”
},
“availability”:“2012-04-11T08:34:00Z/2012-04-11T10:05:59Z”,
“ellipse”:{
“semiMinorAxis”:30000,
“semiMajorAxis”:30000,
“extrudedHeight” : {
“epoch”:“2012-04-11T08:48:46Z”,
“number” : [ 0, 85344 + 15240,
89, 92964 + 15240,
106, 94259.4 + 15240,
184, 100584 + 15240,
256, 106451.4 + 15240,
277, 108204 + 15240,
585, 115824.00000000001 + 15240,
950, 115824.00000000001 + 15240,
1293, 115824.00000000001 + 15240,
1424, 115824.00000000001 + 15240,
1623, 115824.00000000001 + 15240,
1808, 115824.00000000001 + 15240,
2043, 115824.00000000001 + 15240,
2079, 115824.00000000001 + 15240,
2431, 115824.00000000001 + 15240,
2680, 115824.00000000001 + 15240,
2820, 115824.00000000001 + 15240,
3104, 113272.824 + 15240,
3125, 113080.8 + 15240,
3883, 54864.00000000001 + 15240
],
“referenceFrame”:“FIXED”
},
“rotation”:0,
“height” : {
“epoch”:“2012-04-11T08:48:46Z”,
“number” : [ 0, 85344 - 15240,
89, 92964 - 15240,
106, 94259.4 - 15240,
184, 100584 - 15240,
256, 106451.4 - 15240,
277, 108204 - 15240,
585, 115824.00000000001 - 15240,
950, 115824.00000000001 - 15240,
1293, 115824.00000000001 - 15240,
1424, 115824.00000000001 - 15240,
1623, 115824.00000000001 - 15240,
1808, 115824.00000000001 - 15240,
2043, 115824.00000000001 - 15240,
2079, 115824.00000000001 - 15240,
2431, 115824.00000000001 - 15240,
2680, 115824.00000000001 - 15240,
2820, 115824.00000000001 - 15240,
3104, 113272.824 - 15240,
3125, 113080.8 - 15240,
3883, 54864.00000000001 - 15240
],
“referenceFrame”:“FIXED”
},
“material”:{
“solidColor”:{
“color”:{
“rgba”:[
150,30,30,50
]
}
}
},
“outline”:true
},
“polygon”: {
“perPositionHeight”:true
},
“position”:{
“reference”:“path1#position”
}
}
];

var viewer = new Cesium.Viewer(‘cesiumContainer’);
var dataSource = Cesium.CzmlDataSource.load(czml);
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);

``

Best,

Hannah

Ok, I managed to make your example work.
Thanks a lot for the answer, I think I can achieve this with the czml-writer java library.

Thanks again, I was completly stuck :slight_smile: