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
- Rust workspace and docs: https://github.com/3DGI/cityjson
- CityJSON specification: https://www.cityjson.org
- Issues: https://github.com/3DGI/cityjson/issues
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cityjson_index-0.9.0-py3-none-win_amd64.whl.
File metadata
- Download URL: cityjson_index-0.9.0-py3-none-win_amd64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aeca133af0506f77b0dc6890274d011e48466ad622ae2d3f3b1084eff657346
|
|
| MD5 |
49fd7b3d3cda1c7ce86e2e6e9c490f21
|
|
| BLAKE2b-256 |
4ffdf4d8cbe46832c070a684200ce34fb1b0ea34d5a368c5ebfeee5f72a3f73b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cityjson_index-0.9.0-py3-none-win_amd64.whl -
Subject digest:
2aeca133af0506f77b0dc6890274d011e48466ad622ae2d3f3b1084eff657346 - Sigstore transparency entry: 1437406871
- Sigstore integration time:
-
Permalink:
3DGI/cityjson-rs@b07512f78240984da437121cf210c0839d1ba52f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/3DGI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b07512f78240984da437121cf210c0839d1ba52f -
Trigger Event:
push
-
Statement type:
File details
Details for the file cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b676a312e35a60d1848339dbf884636c7440364df766a93bc926d12aad3e3a25
|
|
| MD5 |
6fb8bb086b5b2b00d6e72601a3e87ec6
|
|
| BLAKE2b-256 |
14383591e799f89fdb6d4925a668ed25236aa7593712ab345aeae2e072dec418
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cityjson_index-0.9.0-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
b676a312e35a60d1848339dbf884636c7440364df766a93bc926d12aad3e3a25 - Sigstore transparency entry: 1437406863
- Sigstore integration time:
-
Permalink:
3DGI/cityjson-rs@b07512f78240984da437121cf210c0839d1ba52f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/3DGI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b07512f78240984da437121cf210c0839d1ba52f -
Trigger Event:
push
-
Statement type:
File details
Details for the file cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c0dae9522cbf7ed9401ee3eb5b98e35c25d8fe682174ccc080e53d69fbc4aa1
|
|
| MD5 |
68df2c5c9dbab9662d2a723c9763f0ba
|
|
| BLAKE2b-256 |
e9ccc59d4f7bcaf4329d928ebbb2495f3598355e1b290a5aea331f720f760f9f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cityjson_index-0.9.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
1c0dae9522cbf7ed9401ee3eb5b98e35c25d8fe682174ccc080e53d69fbc4aa1 - Sigstore transparency entry: 1437406858
- Sigstore integration time:
-
Permalink:
3DGI/cityjson-rs@b07512f78240984da437121cf210c0839d1ba52f -
Branch / Tag:
refs/tags/v0.9.0 - Owner: https://github.com/3DGI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b07512f78240984da437121cf210c0839d1ba52f -
Trigger Event:
push
-
Statement type: