Skip to main content

Python toolkit for converting NYC CityGML and LiDAR into web-ready 3D geodata.

Project description

nyc-mesh

Actions Status Documentation Status PyPI version PyPI platforms

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:2263 to EPSG:4326
  • optionally clip by WGS84 bounding box
  • export height-aware GeoJSON
  • run the same flow from the installed nyc-mesh CLI

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:

  1. point at a CityGML source file
  2. extract and clip the buildings you care about
  3. 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

Development

make install-dev
make test
make lint
make docs-build
make ci

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nyc_mesh-0.1.0.tar.gz (114.0 kB view details)

Uploaded Source

Built Distribution

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

nyc_mesh-0.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

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

Hashes for nyc_mesh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec17ad613c818b92238eafdbdb69c43395476493eb5faffc474f7459c1493847
MD5 4401697509254ab2beb1d15e0764d29b
BLAKE2b-256 3776ee2a49892c887cd1dc4b92a76a15ddb7d7bf6dcd38c12e4337f6eb6a7c73

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyc_mesh-0.1.0.tar.gz:

Publisher: cd.yml on random-walks/nyc-mesh

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

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

Hashes for nyc_mesh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afa1ddfec9d66fac5c0045c379a617d26798c1fe13532172251b01fffbd6ec48
MD5 2a216e92f5a2b33e0daa83dad4346ad0
BLAKE2b-256 d896c196c9eab051134c26e95da15b6566e0fb82390fbc48bea01013bd82306a

See more details on using hashes here.

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

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