Does the czml support this polygon hole structure

const bluePolygon = viewer.entities.add({
  name: "Blue polygon with holes",
  polygon: {
    hierarchy: {
      positions: Cesium.Cartesian3.fromDegreesArray([
        -99.0,
        30.0,
        -85.0,
        30.0,
        -85.0,
        40.0,
        -99.0,
        40.0,
      ]),
      holes: [
        {
          positions: Cesium.Cartesian3.fromDegreesArray([
            -97.0,
            31.0,
            -97.0,
            39.0,
            -87.0,
            39.0,
            -87.0,
            31.0,
          ]),
          holes: [
            {
              positions: Cesium.Cartesian3.fromDegreesArray([
                -95.0,
                33.0,
                -89.0,
                33.0,
                -89.0,
                37.0,
                -95.0,
                37.0,
              ]),
              holes: [
                {
                  positions: Cesium.Cartesian3.fromDegreesArray([
                    -93.0,
                    34.0,
                    -91.0,
                    34.0,
                    -91.0,
                    36.0,
                    -93.0,
                    36.0,
                  ]),
                },
              ],
            },
          ],
        },
      ],
    },
    material: Cesium.Color.BLUE.withAlpha(0.5),
    height: 0,
    outline: true, // height is required for outline to display
  },
});

I don‘t know how to use Czml to create a polygon with complicated interior holes. Does CzmlDataSource support this structure?
Here is sandlink: Cesium Sandcastle

1 Like

I know czml support polygon with holes。But I just want to know how to write this complicated example with complicated interior holes. I have tried some ,but failed .
some example like this below:

// packet
{
    "id": "a160d461-9073-4103-aae2-17a3e5aa4a45-tests",
    "name": "Blue polygon with holes",
    "polygon": {
      "positions": {
        "cartographicDegrees": [
          -99.00000000000001,
          29.999999999999993,
          0,
          -85,
          29.999999999999993,
          0,
          -85,
          39.999999999999986,
          0,
          -99.00000000000001,
          39.99999999999999,
          0
        ]
      },
      "holes": [
        {
          "cartographicDegrees": [
            [
              -97,
              31,
              0,
              -97,
              39,
              0,
              -87,
              39,
              0,
              -87,
              31,
              0
            ]
          ],
          "holes": [
            {
              "cartographicDegrees": [
                [
                  -95,
                  33,
                  0,
                  -89,
                  33,
                  0,
                  -89,
                  37,
                  0,
                  -95,
                  37,
                  0
                ]
              ]
            }
          ]
        }
      ],
      "material": {
        "solidColor": {
          "color": {
            "rgbaf": [
              0,
              0,
              1,
              0.5
            ]
          }
        }
      },
      "outline": true
    }
  }

4b74d2bea2974a23f66eef0d0014dde

1 Like