# CZML - Interpolating future data points

**URL:** <https://community.cesium.com/t/czml-interpolating-future-data-points/21513>\
**Category:** CesiumJS\
**Created:** [December 9, 2022, 12:29am UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513 "2022-12-09T00:29:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave\_gould](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dave_gould/32/10613_2.png) [@dave\_gould](https://community.cesium.com/u/dave_gould)\
**Post date:** [December 9, 2022, 12:29am UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/1 "2022-12-09T00:29:46Z")

</div>

Is it possible using CZML + Cesium to have a initial sample dataset, (say an orbital pattern), and generate the next elements for an animation frame outside the extents / timeInterval of that dataset?

Just curious if that supported or even possible, thanks!

-Dave

---

<div class="post-metadata">

**Author:** ![chan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/chan/32/9891_2.png) [@chan](https://community.cesium.com/u/chan)\
**Post date:** [December 9, 2022, 2:50am UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/3 "2022-12-09T02:50:55Z")

</div>

There is no definitive answer. I am in the process of adjusting the time of CZML by importing it from DB with Query statement. It would be nice to proceed by cutting the time of timeInterval.  
ex) …04:10Z/…04:20Z

---

<div class="post-metadata">

**Author:** ![A\_Quark](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@A\_Quark](https://community.cesium.com/u/A_Quark)\
**Post date:** [December 9, 2022, 8:34am UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/4 "2022-12-09T08:34:35Z")

</div>

You can set known data through CZML, obtain its value through` getValue()`, and then use `Cesium. Cartesian3. lerp (start, end, t, result)` for external interpolation.

---

<div class="post-metadata">

**Author:** ![dave\_gould](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dave_gould/32/10613_2.png) [@dave\_gould](https://community.cesium.com/u/dave_gould)\
**Post date:** [December 9, 2022, 2:45pm UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/5 "2022-12-09T14:45:43Z")

</div>

I see @A_Quark, this is great that it could be done programmatically!

I wonder if its possible, (I’m not sure if this exists already) if this functionality could be done in the render loop.

Ex: If `interpolateExtents` is set, the visualizers in the render loop would lerp future/past values for us based on the sample dataset (on this update frame).

The scenario is: we might have a sample dataset from Dec 2-5, but if we allow Cesium’s clock to surpass to Dec 6, we would wish the dataset to continue rendering based on the interpolated data.

Let me know if this exists already, or is even possible!

---

<div class="post-metadata">

**Author:** ![A\_Quark](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@A\_Quark](https://community.cesium.com/u/A_Quark)\
**Post date:** [December 9, 2022, 3:01pm UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/6 "2022-12-09T15:01:05Z")

</div>

You can adjust the time range of the scene through CZML, which is also useful.

---

<div class="post-metadata">

**Author:** ![dave\_gould](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dave_gould/32/10613_2.png) [@dave\_gould](https://community.cesium.com/u/dave_gould)\
**Post date:** [December 12, 2022, 6:31pm UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/7 "2022-12-12T18:31:54Z")

</div>

@Kevin_Ring, do you think its possible for the framework to support lerping future values for a given CZML dataset?

---

<div class="post-metadata">

**Author:** ![Scott\_Hunter](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_hunter/32/2006_2.png) [@Scott\_Hunter](https://community.cesium.com/u/Scott_Hunter)\
**Post date:** [December 12, 2022, 8:13pm UTC](https://community.cesium.com/t/czml-interpolating-future-data-points/21513/8 "2022-12-12T20:13:46Z")

</div>

Do you mean something like the existing CZML extrapolation properties? Specifically, forwardExtrapolationType : “EXTRAPOLATE”. This is available for any CZML property which is interpolatable.

> **[InterpolatableProperty](https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/InterpolatableProperty)**
>
> A library for writing CZML content for use with Cesium. - AnalyticalGraphicsInc/czml-writer
