Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Add new elements to Packet with new Properties accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
Joris Olympio committed Apr 12, 2020
1 parent cd57c94 commit 403403f
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/czml3/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@ class Packet(BaseCZMLObject):
properties = attr.ib(default=None)
position = attr.ib(default=None)
orientation = attr.ib(default=None)
viewFrom = attr.ib(default=None)
billboard = attr.ib(default=None)
box = attr.ib(default=None)
corridor = attr.ib(default=None)
cylinder = attr.ib(default=None)
ellipse = attr.ib(default=None)
ellipsoid = attr.ib(default=None)
label = attr.ib(default=None)
model = attr.ib(default=None)
path = attr.ib(default=None)
point = attr.ib(default=None)
polygon = attr.ib(default=None)
polyline = attr.ib(default=None)
rectangle = attr.ib(default=None)
tileset = attr.ib(default=None)
wall = attr.ib(default=None)


@attr.s(repr=False, frozen=True)
Expand Down
99 changes: 99 additions & 0 deletions src/czml3/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,77 @@ class EllipsoidRadii(BaseCZMLObject, Interpolatable, Deletable):
reference = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class Corridor(BaseCZMLObject):
"""A corridor , which is a shape defined by a centerline and width that conforms to the
curvature of the body shape. It can can optionally be extruded into a volume."""

positions = attr.ib()
show = attr.ib(default=None)
width = attr.ib()
height = attr.ib(default=None)
heightReference = attr.ib(default=None)
extrudedHeight = attr.ib(default=None)
extrudedHeightReference = attr.ib(default=None)
cornerType = attr.ib(default=None)
granularity = attr.ib(default=None)
fill = attr.ib(default=None)
material = attr.ib(default=None)
outline = attr.ib(default=None)
outlineColor = attr.ib(default=None)
outlineWidth = attr.ib(default=None)
shadows = attr.ib(default=None)
distanceDisplayCondition = attr.ib(default=None)
classificationType = attr.ib(default=None)
zIndex = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class Cylinder(BaseCZMLObject):
"""A cylinder, which is a special cone defined by length, top and bottom radius."""

length = attr.ib()
show = attr.ib(default=None)
topRadius = attr.ib()
bottomRadius = attr.ib()
heightReference = attr.ib(default=None)
fill = attr.ib(default=None)
material = attr.ib(default=None)
outline = attr.ib(default=None)
outlineColor = attr.ib(default=None)
outlineWidth = attr.ib(default=None)
numberOfVerticalLines = attr.ib(default=None)
slices = attr.ib(default=None)
shadows = attr.ib(default=None)
distanceDisplayCondition = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class Ellipse(BaseCZMLObject):
"""An ellipse, which is a close curve, on or above Earth's surface."""

semiMajorAxis = attr.ib()
semiMinorAxis = attr.ib()
show = attr.ib(default=None)
height = attr.ib(default=None)
heightReference = attr.ib(default=None)
extrudedHeight = attr.ib(default=None)
extrudedHeightReference = attr.ib(default=None)
rotation = attr.ib(default=None)
stRotation = attr.ib(default=None)
granularity = attr.ib(default=None)
fill = attr.ib(default=None)
material = attr.ib(default=None)
outline = attr.ib(default=None)
outlineColor = attr.ib(default=None)
outlineWidth = attr.ib(default=None)
numberOfVerticalLines = attr.ib(default=None)
shadows = attr.ib(default=None)
distanceDisplayCondition = attr.ib(default=None)
classificationType = attr.ib(default=None)
zIndex = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class Polygon(BaseCZMLObject):
"""A polygon, which is a closed figure on the surface of the Earth."""
Expand Down Expand Up @@ -400,6 +471,34 @@ class Point(BaseCZMLObject):
disableDepthTestDistance = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class TileSet(BaseCZMLObject):
"""A 3D Tiles tileset."""

show = attr.ib(default=None)
uri = attr.ib()
maximumScreenSpaceError = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class Wall(BaseCZMLObject):
"""A two-dimensional wall defined as a line strip and optional maximum and minimum heights.
It conforms to the curvature of the globe and can be placed along the surface or at altitude."""

show = attr.ib(default=None)
positions = attr.ib()
minimumHeights = attr.ib(default=None)
maximumHeights = attr.ib(default=None)
granularity = attr.ib(default=None)
fill = attr.ib(default=None)
material = attr.ib(default=None)
outline = attr.ib(default=None)
outlineColor = attr.ib(default=None)
outlineWidth = attr.ib(default=None)
shadows = attr.ib(default=None)
distanceDisplayCondition = attr.ib(default=None)


@attr.s(repr=False, frozen=True, kw_only=True)
class NearFarScalar(BaseCZMLObject, Interpolatable, Deletable):
""" A numeric value which will be linearly interpolated between two values based on an object's distance from the
Expand Down

0 comments on commit 403403f

Please sign in to comment.