Skip to main content

Create packets of CZML3

Project description

czml3-ext

PyPI - Version PyPI - Python Version PyPI - License

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 example notebook 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, Preamble
from czml3.properties import Color, Material, Polygon, SolidColorMaterial, Ellipsoid

from czml3_ext import packets
from czml3_ext.colours import RGBA

blue = RGBA.blue.copy()
blue[-1] = 100

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

doc = Document([Preamble(name="simple")] + sensor)
with open("example.czml", "w") as f:
    doc.dump(f)

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for czml3_ext-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7be5e99c0fad4e4b1446590dc4d07648bd97b079335dd06cdf788728c380488
MD5 6353b1bc9370bfee3e07eb51306856b2
BLAKE2b-256 981106ec6f9f628785c38732af7d238f9d14c8a48a93b33e81075abe581724c2

See more details on using hashes here.

Provenance

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

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

Attestations:

Supported by

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