CZML question (multipoint support)

We are working with MTI (moving target indicator) data which shows a couple thousand points per radar scan. Right now we are just creating a separate CZML point object for every item. Each point item has to have its own size, color, availability, etc. Having support for “multipoint” would be great as it would significantly reduce the size of our CZML files.

How hard would it be to add support for multipoint data in CZML?

Thanks!

Ashley

Hi Ashley,

I'm familiar with MTI data and a multi-point type is certainly a
viable option that would be easy to add. That being said, can you
tell me a little bit more about your use case, I just want to make
sure we come up with the best solution and I see multiple options on
the table. If you could provide a zipped up sample file for us to
look at, that would be great as well, otherwise I can just experiment
with test data. What's the ballpark number of points you are working
with? Long story short, we want to bring CZML file size down
considerably from where it is now, in the near future I'll be spending
a lot of time on efforts to do so.

Here are three ideas for solving issues like this

1. MultiPoint: A multi-point object would work great if you are
visualizing points and you want each groups of points to have the same
exact visualization. We could probably even have options for
specifying a unique color for each point. The problem is that this is
a special visualizer for just point data, and doesn't extend to the
general case, for example what if I want a label for each point, and
all of the visualization is identical other than the text and
position? We would need to add a multi-label as well, followed by a
multi-billboard, and so on and so forth. Ultimately, with this
solution, each type of visualization needs to be addressed
independently.

2. Links/Styles: We need a links feature finished for a variety of
reasons, but it would be a viable solution here when used as a style
link. You would still specify each point as an independent CZML
object, but rather than specify all of the point graphic options, you
can simply link to a point style on another object. Something like:

{
    "id": "myStyleObject",
    "point":{
      "color":{
        "rgba":[
          255,0,0,255
        ]
      },
      "pixelSize":5.0,
      "show":true
    }
}
{,
    "id": "foo",
    "position": { "cartographicDegrees": [0,0,0] },
    "point": "#myStyleObject.point"
},
{
    "id": "bar",
    "position": { "cartographicDegrees": [1,0,0] },
    "point": "#myStyleObject.point"
}

This option would considerable shrink the CZML and the only draw back
is that you can't override individual properties for the point. If
everything has the same graphics, this ends up working for points,
billboards, etc... It will still have problems with labels unless you
want everything to have the same label. On the client side we don't
have to introduce any new objects and it will also save memory.

3. Prototype objects: This one is my favorite. It allows you to
specify a CZML object that has all default values for any number of
properties. The objects simply list the prototype object in their
definition and inherit all of the properties. They can then also
override any properties themselves.

{
    "id": "myPrototypeObject",
    "point":{
      "color":{
        "rgba":[
          255,0,0,255
        ]
      },
      "pixelSize":5.0,
      "show":true
    }
}
{,
    "id": "foo",
    "prototype": "myPrototypeObject",
    "position": { "cartographicDegrees": [0,0,0] },
    "point": { "pixelSize":3.0}
},
{
    "id": "bar",
    "prototype": "myPrototypeObject",
    "position": { "cartographicDegrees": [1,0,0] },
}

So foo and bar both share the defaults in myPrototypeObject, but foo
override the pixelSize to be 3.0 instead of 5.0.

Sorry for a long post, but since I'm always looking for use cases and
feedback, I thought it was best to flesh out my ideas. Let me know if
anything I said was unclear. I think 3 is the best choice and that 2
needs to happen anyway as part of other work to bring file-size down.
2 and 3 can probably be combined for kick-ass prototype/style objects.

Let me know what you think.

Thanks for reading,

Matt

1 Like

Hello Mathew,

for optimizing the size of CZML, as u had suggested in this post i tried with both the above points 2 and 3 , but in vain.

Please find the attachments for both the points CZML and let me know where i am going wrong.

attachments are defined as :

for point2 : billboardOptimizingWithIdandHash.czml and billboardOptimizingWithIdandHashImage.czml

for point3 : billboardOptimizingWithProtype.czml

thnaks and regards

chandrika

billboardOptimizingWithIdandHash.czml (1.09 KB)

billboardOptimizingWithIdandHashImage.czml (1.01 KB)

billboardOptimizingWithProtype.czml (1.07 KB)