Skip to main content

Python bindings for cityjson-index

Project description

cityjson-index

Python bindings for the cityjson-index Rust crate — a SQLite-backed random-access index over CityJSONSeq streams for CityJSON 2.0 data.

The distribution name is cityjson-index; the import name is cityjson_index. The package ships its own prebuilt native library (built from the Rust C-ABI core) and wraps it with ctypes — no Rust toolchain is required on the user side. cityjson-index also depends on cityjson-lib==0.8.0 at runtime; each package ships its own native library (there is no shared .so).

Install

pip install cityjson-index

Prebuilt wheels are published for:

  • Linux x86_64 (manylinux)
  • macOS x86_64 and arm64
  • Windows AMD64

Python 3.11, 3.12, and 3.13 are supported.

Quick start

from cityjson_index import OpenedIndex

with OpenedIndex.open("city.idx") as index:
    feature = index.get("building-42")
    print(feature.id, len(feature.payload))

Filtered reads

from cityjson_index import FeatureFilter, FeatureFilterSummary, LodSelection, OpenedIndex

with OpenedIndex.open("dataset") as index:
    refs = index.feature_ref_page(0, 100)
    filter = FeatureFilter(
        cityobject_types={"Building"},
        default_lod=LodSelection.HIGHEST,
        lods_by_type={"Building": LodSelection.Exact("2.0")},
    )

    summary = FeatureFilterSummary()
    for feature in index.read_filtered_features(refs, filter):
        summary.add(feature.diagnostics)
        print(feature.model.summary().model_type)

    summary.ensure_requested_lods_available(filter)

Links

License

Dual-licensed under MIT or Apache-2.0, at your option.

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 Distributions

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

cityjson_index-0.9.0-py3-none-win_amd64.whl (2.6 MB view details)

Uploaded Python 3Windows x86-64

cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl (3.2 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file cityjson_index-0.9.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for cityjson_index-0.9.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2aeca133af0506f77b0dc6890274d011e48466ad622ae2d3f3b1084eff657346
MD5 49fd7b3d3cda1c7ce86e2e6e9c490f21
BLAKE2b-256 4ffdf4d8cbe46832c070a684200ce34fb1b0ea34d5a368c5ebfeee5f72a3f73b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cityjson_index-0.9.0-py3-none-win_amd64.whl:

Publisher: release.yml on 3DGI/cityjson-rs

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

File details

Details for the file cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b676a312e35a60d1848339dbf884636c7440364df766a93bc926d12aad3e3a25
MD5 6fb8bb086b5b2b00d6e72601a3e87ec6
BLAKE2b-256 14383591e799f89fdb6d4925a668ed25236aa7593712ab345aeae2e072dec418

See more details on using hashes here.

Provenance

The following attestation bundles were made for cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on 3DGI/cityjson-rs

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

File details

Details for the file cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c0dae9522cbf7ed9401ee3eb5b98e35c25d8fe682174ccc080e53d69fbc4aa1
MD5 68df2c5c9dbab9662d2a723c9763f0ba
BLAKE2b-256 e9ccc59d4f7bcaf4329d928ebbb2495f3598355e1b290a5aea331f720f760f9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on 3DGI/cityjson-rs

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