optimizing czml i.e, referencing the material of the parent entity

Hello Mathew/Patrick,

we are using CZML for rendering the polylines on the map, when there is huge data say 25k to 20k polylines with innumerable positions for each of the entities we are unable to render on the map cause of the huge size of CZML.

please let us know how to optimize the CZML i.e reducing the size of it.

we have already optimised the description based on the “parent” of CZMLWriter. but Inorder to further optimize the CZML generated can we use references to material ??

i could see references to postions, but it is not useful to us as none of the positions of each of the entities are not repetitive.

so it is best if we could optimize styling that is the material, please let us know how we can use reference to material with sample CZML.

or is there any other way that we could reduce the size of the CZML similar to below CZML

[

{

“id”:“document”,

“version”:“1.0”

},

{

“id”:“20069_Linestring_08_04”,

“description”:"{“artefactname”:“Linestring_08_04”,“layerid”:20069,“layername”:“Linestring_08_04(1)”}"

},

{

“id”:“1433486776790011068731052231952143348677679104642”,

“name”:“1.0”,

“parent”:“20069_Linestring_08_04”,

“description”:"{“artifactid”:“1433486776770011011241079262937”}",

“polyline”:{

“material”:{

“solidColor”:{

“color”:{

“rgba”:[

0,128,255,255

]

}

}

},

“width”:1,

“positions”:{

“cartographicDegrees”:[

-107.3709107447025,24.69541972598256,0,-107.3163353501408,25.16337635603826,0,-107.9249506717812,24.92140844923159,0

]

},

“show”:true

}

},

{

“id”:“1433486776790021031871099282305143348677679100431”,

“name”:“2.0”,

“parent”:“1433486776790011068731052231952143348677679104642”,

“description”:"{“artifactid”:“1433486776770021067081077717701”}",

“polyline”:{

“material”:{

“references”:[

“1433486776790011068731052231952143348677679104642#polyline.material”

]

}

Hello Mathew/Patrick,

using prototype as given in the below link:

https://groups.google.com/forum/#!search/reduce$20the$20size$20of$20czml/cesium-dev/5VlOiaD_JxM/xiscPhfiiacJ

just wnated to add one more point for the optimization of cZML, have used “protoype” for the same as given in the below CZML, but unable to render only:

please let me know where i am going wrong or guide me through …thanks a lot

[

{

“id”:“document”,

“version”:“1.0”

},

{

“id”: “myPrototypeObject”,

“billboard”: {

“image”:“data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=”

}

},

{

“id”: “foo”,

“prototype”: “myPrototypeObject”,

“position”: {

“cartesian”: [

-2373754.663701, -4665332.880136, 3628133.689242

]

}

},

{

“id”: “bar”,

“prototype”: “myPrototypeObject”,

“position”: { “cartographicDegrees”: [-106.6271213007055,25.31195271848213,0] }

}

]

thanks and regards

chandrika

Hello Mathew/Patrick,

so far we have almost migrated from GE to CESIUM and has seen that cesium could replace almost all what we needed so far, which is great.

but is stuck with the optimization of czml to reduce the size of it for supporting huge number of entities say in millions, this is the only thing left for us.

it would be great if u could let me know where i am going wrong in the above CZML with the “prototype”

Thank and regards,

chandrika

Chandrika, have you looked at the CZML Content list?
I don't see anything there about "prototype"

Hello Ben,

thank u so much for the reply.

so far we could render almost everything on the Cesium Map with CZML. Found the Cesium API very impressive.

we have only one problem with the CZML when we have huge data to render say around 50000 polylines on the map, hence our goal was to optimize the CZML to reduce the size of it so that the huge number of lines can be rendered on the map in a faster time.

Hence to acheive the above goal i tried using the following points suggested in the forums:

1.usage of prototype in CZML

prototype as given by Mathew in the below forum link

https://groups.google.com/forum/#!searchin/cesium-dev/chandrika/cesium-dev/5VlOiaD_JxM/0FEczkEhBesJ

  1. usage of reference in CZML

reference for the color of the material as posted by me in the forum

https://groups.google.com/forum/#!searchin/cesium-dev/chandrika/cesium-dev/pxO5fomau_k/bdbfieSuz5cJ

please guide me as to how to go about the same.

Thanks and regards,

chandrika

I’m not sure what the answer is. All I’m saying is that it sounded like Mathew was offering “prototype” as a concept solution only. And that it’s not (as of yet) a real solution. I have need of such a solution myself.

Ben is correct, the entire prototype concept was just me brainstorming and is not part of the official spec in any way. CZML in its current form is not meant to support millions of entities and I doubt it ever well. In order to support massive amounts of data like that, view-based streaming geometry will need to be supported, and that’s something the Cesium team is actively looking into. You just can’t brute force large amounts of data in a browser the same way you could in desktop-based solutions. Browsers are far more limited. I described some of those issues here: https://groups.google.com/d/msg/cesium-dev/F6IkY9aEG1I/8dRkhlBnLI4J

Keep in mind that it’s just not the size of the CZML that’s the problem, but the overall number of Entities created in Cesium.

I expect massive improvements for these types of use cases in within the next year. The building streaming demos (such as WashingtonDC) are the start of this work.