Skip to content

feat: add 3D extension#2211

Merged
carlopi merged 1 commit into
duckdb:mainfrom
HideBa:main
Jul 10, 2026
Merged

feat: add 3D extension#2211
carlopi merged 1 commit into
duckdb:mainfrom
HideBa:main

Conversation

@HideBa

@HideBa HideBa commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Add the three_d community extension.
This extension makes the polyhedral solids in 3D city models — buildings from CityJSON / 3DBAG / CityParquet — first-class, queryable values in DuckDB. It exposes solid-aware types and PostGIS-style ST_* / ST_3D* functions for measuring enclosed volume, footprint area and building height, validating topology, and running 3D distance queries, all on a self-contained C++ kernel (no CGAL/SFCGAL).

Key Features

  • Two types: SOLID_3D (closed polyhedral solids, topology-preserving payload) and GEOM_3D (points/lines/polygons/surfaces).
  • Measurement: ST_3DVolume, ST_3DSurfaceArea, ST_Area (footprint), ST_ZMax − ST_ZMin (height).
  • Validation, not repair: ST_3DIsClosed / ST_3DIsManifold / ST_3DIsOriented / ST_3DValidationReport.
  • 3D proximity: ST_3DDistance, ST_3DDWithin, ST_3DClosestPoint, ST_3DShortestLine.
  • Composes with the cityjson extension: ST_3DFromWKB(geometry, geometry_properties) on its per-LOD WKB output.

Source Repository: https://github.com/cityjson/duckdb-3d-extension

3D solid processing for CityJSON / 3DBAG / CityParquet city models: enclosed
volume, closed/manifold/oriented validation, footprint area, building height,
and 3D distance on SOLID_3D / GEOM_3D types. Self-contained C++ kernel.

Repo: cityjson/duckdb-3d-extension @ a08f240

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@carlopi

carlopi commented Jul 10, 2026

Copy link
Copy Markdown
Member

Thanks!

@carlopi carlopi merged commit e43a6bb into duckdb:main Jul 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants