Skip to main content

Create packets of CZML3

Project description

czml3-ext

PyPI - Version PyPI - Python Version build

This library is a collection of functions that outputs lists of czml3.packets for various items, as shown in the table below. See czml3 for more information about CZML properties.

Item Function in czml3_ext.packets
Sensor sensor
Grid grid
Border border
Coverage coverage

Installation

pip install czml3-ext

Examples

See the examples folder for a full demo of the package. Run pip install czml3_ext[examples] to run the examples locally.

The following code produces a CZML file with a single sensor:

import numpy as np
from czml3 import Document, Packet, CZML_VERSION
from czml3.properties import (
    Color,
    Ellipsoid,
    EllipsoidRadii,
    Material,
    SolidColorMaterial,
)

from czml3_ext import packets
from czml3_ext.colours import RGBA_blue, RGBA_white

sensor = packets.sensor(
    np.array([[31.4], [34.7], [1000]]),
    10,
    30,
    100,
    20,
    10_000,
    5_000,
    name="A Sensor",
    ellipsoid=Ellipsoid(
        radii=EllipsoidRadii(cartesian=[0, 0, 0]),
        material=Material(
            solidColor=SolidColorMaterial(
                color=Color(rgbaf=Colour("blue", alpha=0.3).rgba)
            )
        ),
        outlineColor=Color(rgba=list(Colour("white").rgb)),
        fill=True,
        outline=True,
    ),
)

doc = Document(
    packets=[Packet(name="simple", id="document", version=CZML_VERSION)] + sensor
)
with open("example.czml", "w") as f:
    f.write(doc.dumps())

This produces the following view: Example

Contributing

PRs are always welcome and appreciated!

After forking the repo install the dev requirements: pip install -e .[dev].

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

czml3_ext-0.11.0-py3-none-any.whl (7.6 MB view details)

Uploaded Python 3

File details

Details for the file czml3_ext-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: czml3_ext-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for czml3_ext-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74b8f2ddea3d11bb95304d60aba336e693b1af4a78ca36f224e70684e6d91e6c
MD5 83d1ca12674a04961bdf2b0eb8b40142
BLAKE2b-256 dfee6c7e18b0fc72d67410e24cec923e85c978f3ec57e8d1c71d332a290197bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for czml3_ext-0.11.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Stoops-ML/czml3-ext

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page