Skip to main content

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:
    package = index.get("building-42")
    print(package.id, len(package.payload))

Filtered reads

from cityjson_index import PackageFilter, PackageFilterSummary, LodSelection, OpenedIndex

with OpenedIndex.open("dataset") as index:
    cityobjects = index.lookup_cityobject_refs("building-42")
    refs = index.package_refs_for_cityobject(cityobjects[0])
    filter = PackageFilter(
        cityobject_types={"Building"},
        default_lod=LodSelection.HIGHEST,
        lods_by_type={"Building": LodSelection.Exact("2.0")},
    )

    summary = PackageFilterSummary()
    for package in index.read_filtered_packages(refs, filter):
        summary.add(package.diagnostics)
        print(package.model.summary().model_type)

    summary.ensure_requested_lods_available(filter)

Links

License

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

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.10.0-py3-none-win_amd64.whl (2.7 MB view details)

Uploaded Python 3Windows x86-64

cityjson_index-0.10.0-py3-none-manylinux_2_28_x86_64.whl (3.3 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

cityjson_index-0.10.0-py3-none-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for cityjson_index-0.10.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8f0d58ed2bd02dd0f75bae0fbbd771b4517d5d94bc7f944f8746a66042420ac3
MD5 7d0b2ecb91cc3e813d35c05e3dc1d4fb
BLAKE2b-256 4f48810f59047045946ac1cded618bce1284f00c37675c560f3abf5de5ba35f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cityjson_index-0.10.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.10.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cityjson_index-0.10.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a13f0c88a2402e8907c0e76e6f87c5da6aefcff408c0a5527164a613ef2a4767
MD5 ca84db4af373e8b5caf9aecbe3201e44
BLAKE2b-256 37b16e90c489eb574d3ccb3cd25ae098dd8fe71ef6225c61a4fb24c0dc948be8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cityjson_index-0.10.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.10.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cityjson_index-0.10.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b95f930114133ac57613bf47d40f63fbda0a572da2ba2d48dbdd4eb2273ade7a
MD5 3a4e409fb65c548eedebfad8b11d36c1
BLAKE2b-256 e7c5479cc8d85e7b12e675aa879bbded3ba5bc8af3dcdc58607a9b7c7eeacd51

See more details on using hashes here.

Provenance

The following attestation bundles were made for cityjson_index-0.10.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.

Release history Release notifications | RSS feed

0.11.0

3 files

This release

0.10.0 This release

3 files

0.9.0

3 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page