GithubHelp home page GithubHelp logo

Comments (2)

astrojuanlu avatar astrojuanlu commented on May 27, 2024

Hi @khoohuibo , thanks for your interest in czml3! I guess you refer to this piece of code:

czml3/src/czml3/types.py

Lines 318 to 335 in d7f0b72

@attr.s(repr=False, frozen=True, kw_only=True)
class IntervalValue(BaseCZMLObject):
"""Value over some interval."""
_start = attr.ib()
_end = attr.ib()
_value = attr.ib()
def to_json(self):
obj_dict = {"interval": TimeInterval(start=self._start, end=self._end)}
try:
obj_dict.update(**self._value.to_json())
except AttributeError:
key = TYPE_MAPPING[type(self._value)]
obj_dict[key] = self._value
return obj_dict

And here are a couple of examples of how to use IntervalValue from the tests:

start = dt.datetime(2019, 1, 1, tzinfo=dt.timezone.utc)
end = dt.datetime(2019, 1, 2, tzinfo=dt.timezone.utc)
prop = IntervalValue(start=start, end=end, value=True)

clock=IntervalValue(
start=start, end=end, value=Clock(currentTime=start, multiplier=60)
),

Would you please paste here what code is producing the error you describe, so we can try to reproduce it? For my understanding everything is working as expected, but CZML documentation is sparse and it's also possible that I'm missing something.

from czml3.

astrojuanlu avatar astrojuanlu commented on May 27, 2024

Closing because of inactivity.

from czml3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.