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.

Authored by Blaise Albis-Burdige.

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 current line

The current package now includes a real official-data workflow:

  • load local or zip-wrapped official CityGML, LiDAR, DEM, and footprint inputs
  • fetch official PLUTO and building-footprint context for a chosen study-area bbox
  • reproject CityGML source coordinates from EPSG:2263 to EPSG:4326
  • clip buildings to named study areas or explicit WGS84 bounding boxes
  • join PLUTO-style attributes onto extracted buildings
  • generate lightweight terrain meshes from official DEM or LiDAR inputs
  • export GeoJSON, GeoParquet, glTF, and a minimal 3D Tiles package
  • build typed cache manifests for real study areas

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 web-friendly artifacts or analysis-ready files

Quickstart

Install:

pip install nyc-mesh

Export GeoJSON from a real CityGML source:

nyc-mesh export-geojson --input "C:/path/to/DA_WISE_GML.zip" --output buildings.geojson

Examples

examples/ now follows the same self-contained project pattern used by nyc311. Start with:

  • examples/quickstart-citygml/
  • examples/landmark-3d-stack/
  • examples/building-height-analysis/
  • examples/example-template/

Python example

from pathlib import Path

from nyc_mesh import models, pipeline

pipeline.export_citygml_geojson(
    Path("C:/path/to/DA_WISE_GML.zip"),
    Path("buildings.geojson"),
    bbox=models.BoundingBox(
        min_lat=40.70,
        min_lon=-74.02,
        max_lat=40.72,
        max_lon=-73.99,
    ),
)

Current assumptions

The official-data workflow is intentionally opinionated:

  • large CityGML / DEM / LiDAR archives stay out of git and are treated as local cache assets
  • 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

PLUTO joins, real footprints, and terrain inputs are treated as practical building blocks, while the examples document exactly which official sources or local cache paths they need.

Documentation

Quick links

Docs: Home, Getting Started, CLI Reference, Pipeline Guide, Architecture, Examples, Python API, Contributing, Releasing, Changelog

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.2.0.tar.gz (211.3 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.2.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file nyc_mesh-0.2.0.tar.gz.

File metadata

  • Download URL: nyc_mesh-0.2.0.tar.gz
  • Upload date:
  • Size: 211.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 0f7f69ee859d2e236a576af6d5eb92a75c83660e66dd16966a36822c0cc1ec1e
MD5 b354f309423a5a10b2dc39d90d3f542c
BLAKE2b-256 5e98055798894902e75e53e51134df383462113f667c26d2180d52c4f9ccfb3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyc_mesh-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: nyc_mesh-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44bc47815679ed1a59deb19248d1aefc3555dd28824e67b72b500a1f6c91b85d
MD5 0fc5a25b4940836a2cc28935a6e05c95
BLAKE2b-256 50c7b50f3423a03adf30c8ad5bef1c3ccec37dbe264b413642d9a4b98074bb1d

See more details on using hashes here.

Provenance

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