8 unstable releases (3 breaking)
Uses new Rust 2024
| new 0.9.0 | May 1, 2026 |
|---|---|
| 0.6.1 | Apr 22, 2026 |
| 0.5.3 | Apr 20, 2026 |
| 0.4.0 | Apr 17, 2026 |
#632 in Geospatial
36 downloads per month
Used in 3 crates
1MB
19K
SLoC
cityjson-lib
cityjson_lib is the publishable CityJSON facade for Rust, plus the shared FFI
surface used by the Python and C++ bindings in this repository.
The current published surface is intentionally small:
- Rust document and feature-stream IO through
cityjson_lib::json - Rust workflow helpers through
cityjson_lib::ops - Rust summary helpers through
cityjson_lib::query - Python and C++ bindings over the shared FFI core
Arrow, Parquet, and wasm are not part of the current release-facing surface.
Quick Start
use cityjson_lib::{json, query};
let model = json::from_file("amsterdam.city.json") ?;
let summary = query::summary( & model);
println!("{} cityobjects", summary.cityobject_count);
let bytes = json::to_vec( & model) ?;
# let _ = bytes;
# Ok::<(), cityjson_lib::Error>(())
Docs
The minimal docs set lives under docs/.
Start with:
Acknowledgements
cityjson-lib's native subset and merge workflows were ported from cjio, the CityJSON/io project, which is licensed under MIT.
Contributing
This crate follows the workspace contract. See
CONTRIBUTING.md for PR guidelines and
docs/development.md for tooling, lints,
and release flow.
Crate-specific notes: the ffi/ subtree ships FFI cores for Python, C++,
and wasm; see the just ffi helper and docs/ffi/.
License
Dual-licensed under MIT or Apache-2.0, at your option. See
LICENSE and LICENSE-APACHE.
Dependencies
~0.6–11MB
~246K SLoC