Skip to content

TUR-302: Import: read points from GeoParquet - #1338

Merged
rjb32 merged 6 commits into
mainfrom
remyboutonnet/tur-302-6-geoparquet-points
Nov 6, 2026
Merged

rjb32 merged 6 commits into
mainfrom
remyboutonnet/tur-302-6-geoparquet-points

Conversation

@rjb32

@rjb32 rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Read points from GeoParquet.

@rjb32

rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Note

AI-generated summary.

Summary

Goal. LOAD PARQUET reads GeoParquet point columns as points, with no clause: a column Parquet's GEOMETRY or GEOGRAPHY logical type marks, or one GeoParquet 1.x's geo file metadata names.

Approach. ParquetGeometry is built once per file. It finds the geometry columns and the CRS family of each: OGC:CRS84, EPSG:4326 or EPSG:4979 for wgs-84, an undefined CRS ("crs": null) for cartesian, and a PROJJSON CRS by its id. Any other CRS is rejected. It decodes each value as a WKB point, little- or big-endian, ISO or EWKB, 2D or 3D, with an empty point read as null. Lists of geometries become lists of points. A geometry that is no point, a point with a measure, and bytes that are no WKB are rejected.

Where to look.

  • io/parquet/ParquetGeometry.cpp:157 findColumn: logical type first, then GeoParquet metadata
  • io/parquet/ParquetGeometry.cpp:180 readPoint: the WKB decoding
  • io/parquet/ParquetGeometry.cpp:277 crsOfString: the CRS mapping
  • io/parquet/ParquetImportVisitor.cpp:199: where a geometry column becomes a Point property
OGC:CRS84 / EPSG:4326 / EPSG:4979 / default   -> wgs-84, or wgs-84-3d for Point Z
GeoParquet "crs": null                        -> cartesian, or cartesian-3d
anything else                                 -> rejected

Evidence

  • Before: a WKB column loads as a String property of raw bytes.
    After: the test writes its node files with the Parquet C++ writer: native GEOMETRY and GEOGRAPHY logical types, and geo metadata.
    test_query_ir_load_parquet_point   [  PASSED  ] 16 tests.
    Parquet import suites              9/9 passed
    

Merge Danger

Door: two-way

Blast Radius: import

A GeoParquet file that used to load its geometry column as a string property now loads it as points, or fails if the column holds other geometries or a CRS no point is in.

@rjb32
rjb32 added this pull request to stack #1347 November 5, 2026 22:38
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-5-jsonl-points branch from 850cba8 to 9eea358 Compare November 6, 2026 09:22
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-6-geoparquet-points branch 2 times, most recently from 01a03cc to c691527 Compare November 6, 2026 15:59
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-5-jsonl-points branch from 9eea358 to 66ba204 Compare November 6, 2026 15:59
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-5-jsonl-points branch from 66ba204 to ea926ef Compare November 6, 2026 19:19
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-6-geoparquet-points branch from c691527 to 57e2a5d Compare November 6, 2026 19:19
@rjb32
rjb32 removed this pull request from stack #1347 November 6, 2026 19:36
@rjb32
rjb32 changed the base branch from remyboutonnet/tur-302-5-jsonl-points to main November 6, 2026 19:37
@rjb32
rjb32 merged commit 57e2a5d into main Nov 6, 2026
4 checks passed
@rjb32
rjb32 deleted the remyboutonnet/tur-302-6-geoparquet-points branch November 6, 2026 19:37
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.

1 participant