Python toolkit for converting NYC CityGML and LiDAR into web-ready 3D geodata.
Project description
nyc-mesh
Python toolkit for converting NYC open 3D source data into web-ready geodata.
nyc-mesh focuses on the messy middle between raw public CityGML releases and
practical outputs for browsers, notebooks, and reproducible analysis workflows.
What ships in the 0.1 line
The current release implements one honest end-to-end path:
- load a local CityGML file
- extract footprint and measured height
- reproject source coordinates from
EPSG:2263toEPSG:4326 - optionally clip by WGS84 bounding box
- export height-aware GeoJSON
- run the same flow from the installed
nyc-meshCLI
Everything else stays scaffolded with explicit NotImplementedError
placeholders until the implementation is real.
Why this exists
NYC publishes unusually rich 3D geospatial data, but the raw formats are hard to use in practice. The source files are large, specialist, and awkward to transform into lightweight outputs for web rendering or neighborhood-scale analysis.
This package aims to make the first useful workflow feel like:
- point at a CityGML source file
- extract and clip the buildings you care about
- export a web-friendly GeoJSON artifact
Quickstart
Install:
pip install nyc-mesh
Export GeoJSON from CityGML:
nyc-mesh export-geojson --input sample.gml --output buildings.geojson
Python example
from pathlib import Path
from nyc_mesh import BoundingBox, export_citygml_geojson
export_citygml_geojson(
Path("sample.gml"),
Path("buildings.geojson"),
bbox=BoundingBox(
min_lat=40.70,
min_lon=-74.02,
max_lat=40.72,
max_lon=-73.99,
),
)
Current assumptions
The implemented 0.1 path is intentionally narrow:
- local CityGML files only
- only buildings with
bldg:measuredHeight - source coordinates are treated as
EPSG:2263 - outputs are reprojected to
EPSG:4326 - optional clipping uses a WGS84 bounding box
Notebook walkthrough
The repo includes a small reproducible notebook at
notebooks/dumbo-citygml-geojson-walkthrough.ipynb for the current happy path.
Documentation
- Hosted docs: nyc-mesh.readthedocs.io
- Local preview:
make docs - Strict docs build:
make docs-build
Development
make install-dev
make test
make lint
make docs-build
make ci
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 nyc_mesh-0.1.0.tar.gz.
File metadata
- Download URL: nyc_mesh-0.1.0.tar.gz
- Upload date:
- Size: 114.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec17ad613c818b92238eafdbdb69c43395476493eb5faffc474f7459c1493847
|
|
| MD5 |
4401697509254ab2beb1d15e0764d29b
|
|
| BLAKE2b-256 |
3776ee2a49892c887cd1dc4b92a76a15ddb7d7bf6dcd38c12e4337f6eb6a7c73
|
Provenance
The following attestation bundles were made for nyc_mesh-0.1.0.tar.gz:
Publisher:
cd.yml on random-walks/nyc-mesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nyc_mesh-0.1.0.tar.gz -
Subject digest:
ec17ad613c818b92238eafdbdb69c43395476493eb5faffc474f7459c1493847 - Sigstore transparency entry: 1227898722
- Sigstore integration time:
-
Permalink:
random-walks/nyc-mesh@0d5cab433175f17a375c05ea69e28ebe189a9cc0 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/random-walks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@0d5cab433175f17a375c05ea69e28ebe189a9cc0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nyc_mesh-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nyc_mesh-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afa1ddfec9d66fac5c0045c379a617d26798c1fe13532172251b01fffbd6ec48
|
|
| MD5 |
2a216e92f5a2b33e0daa83dad4346ad0
|
|
| BLAKE2b-256 |
d896c196c9eab051134c26e95da15b6566e0fb82390fbc48bea01013bd82306a
|
Provenance
The following attestation bundles were made for nyc_mesh-0.1.0-py3-none-any.whl:
Publisher:
cd.yml on random-walks/nyc-mesh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nyc_mesh-0.1.0-py3-none-any.whl -
Subject digest:
afa1ddfec9d66fac5c0045c379a617d26798c1fe13532172251b01fffbd6ec48 - Sigstore transparency entry: 1227898794
- Sigstore integration time:
-
Permalink:
random-walks/nyc-mesh@0d5cab433175f17a375c05ea69e28ebe189a9cc0 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/random-walks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@0d5cab433175f17a375c05ea69e28ebe189a9cc0 -
Trigger Event:
release
-
Statement type: