CZML and polyline in 4D

Hi to all! I want to change the final position of a polyline with the time. Why appear an error following this structure?

{
"id" : "orangeLine",
"name" : "Orange line with black outline at height and following the surface",
"polyline" : {
"positions" : {
"cartographicDegrees" : [
-75, 30, 0,
-75, 30, {"number":["2012-08-04T16:00:00Z",5000,"2012-08-04T17:00:00Z",50000]}
]
},
"material" : {
"polylineOutline" : {
"color" : {
"rgba" : [255, 165, 0, 255]
},
"outlineColor" : {
"rgba" : [0, 0, 0, 255]
},
"outlineWidth" : 2
}
},
"width" : 5
}
}

Thanks!

Hi to all! I want to change the final position of a polyline with the time. Why appear an error following this structure?

{
"id" : "orangeLine",
"name" : "Orange line with black outline at height and following the surface",
"polyline" : {
"positions" : {
"cartographicDegrees" : [
-75, 30, 0,
-75, 30, {"number":["2012-08-04T16:00:00Z",5000,"2012-08-04T17:00:00Z",50000]}
]
},
"material" : {
"polylineOutline" : {
"color" : {
"rgba" : [255, 165, 0, 255]
},
"outlineColor" : {
"rgba" : [0, 0, 0, 255]
},
"outlineWidth" : 2
}
},
"width" : 5
}
}

Thanks!

If you could access the documentation it would say:

`cartographicDegrees` | Interval | array | The list of positions represented as WGS 84 `[Longitude, Latitude, Height, Longitude, Latitude, Height, ...]` where longitude and latitude are in degrees and height is in meters. |

It does not mention having "number" in the "cartographicDegrees" field.
Your json document is not correct, this is why you are having an error.

Thanks for your help :wink: But I want change the position of one vertex of the polyline, for example in 2015-01-01 the vertex has the coordinates 90, 80 and in 2020-01-01 has 45, 45. Do you know how implement that?

Thanks again!

would something like this do the trick. P.S I am not an expert in this, I just tried to interpret what the "little" information there is on the subject.

[
{
    "id" : "orangeLine",
    "name" : "Orange line with black outline at height and following the surface",
    "polyline" : {
      "positions": [
        {
          "interval" : "2015-01-01/2015-01-01",
          "cartographicDegrees" : [-75, 30, 0, 90, 80, 0]
        },
        {
          "interval" : "2020-01-01/2020-01-01",
          "cartographicDegrees": [-75, 30, 0, 45, 45, 0]
        }],
      "material" : {
        "polylineOutline" : {
          "color" : {
            "rgba" : [255, 165, 0, 255]
          },
          "outlineColor" : {
            "rgba" : [0, 0, 0, 255]
          },
          "outlineWidth" : 2
        }
      },
      "width" : 5
    }
  }
]

Hello! Thanks for your answer! I try to execute this code:
   {

    "id" : "orangeLine",
    "name" : "Orange line with black outline at height and following the surface",
    "polyline" : {
      "positions": [
        {
          "interval" : "2012-08-04T16:00:00Z/2012-08-04T16:30:00Z",
          "cartographicDegrees" : [-75, 30, 0, -75, 30, 500000]
        },
        {
          "interval" : "2012-08-04T16:30:00Z/2012-08-04T17:00:00Z",
          "cartographicDegrees": [-75, 30, 0, -75, 30, 250000]
        }],

      "material" : {
        "polylineOutline" : {
          "color" : {
            "rgba" : [255, 165, 0, 255]
          },
          "outlineColor" : {
            "rgba" : [0, 0, 0, 255]
          },
          "outlineWidth" : 2
        }
      },
      "width" : 5
    }
  }
  
But the problem is that the polyline is static, not increase bit by bit, only increase the polyline when finish the interval time and start the other position. Do you know how to resolve it?

Thanks again!

Hello,

You might want to consider using a Path instead of a Polyline.

Here is an example:

Best,

Hannah

To define time-varying position arrays in CZML, your best bet is to declare positions as an array of references to other entities’ positions, each of which can vary individually with respect to time.

This example shows a polygon, but the same approach works for polylines as well.

http://cesiumjs.org/releases/1.16/Apps/Sandcastle/index.html?src=CZML%20Polygon%20-%20Interpolating%20References.html&label=CZML