Skip to content

fix(data): read GeoParquet 2.0 and native Parquet geometry in the system the file says - #3408

Merged
Mavrick-F merged 13 commits into
opengeos:mainfrom
Mavrick-F:fix/geoparquet-2-native-types
Nov 30, 2026
Merged

Mavrick-F merged 13 commits into
opengeos:mainfrom
Mavrick-F:fix/geoparquet-2-native-types

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Summary

GeoParquet 2.0 makes the Parquet GEOMETRY/GEOGRAPHY type the source of truth for the coordinate system, and files without geo metadata are to be read. RustGIS took the system from geo alone, so a native-only file in UTM was read as degrees without a word, and one whose column had an unusual name was refused.

  • Column: the geo primary column, then a native type, then the usual names. With several native columns and nothing naming one, a notice says which is read.
  • System: the native type's, as PROJJSON, authority:code (EPSG, OGC, ESRI), srid:<code> or projjson:<key>; none means OGC:CRS84. When it differs from geo's, the type wins with a notice; equivalent forms say nothing. Text that can't be read at all leaves it to geo, with a notice. Any other system RustGIS can't use gets the existing assumed.crs notice.
  • Unknown system (srid:0, crs: null): read with an assumed.crs notice rather than refused, as Shapefile, CSV and GML readers do. When the coordinates can't be degrees it says so and points to Define Projection, which fixes a loaded layer.
  • Coordinates that can't be degrees in a file read as longitude/latitude, whether it says so or says nothing, get the notice a Shapefile gets.
  • Edges and epoch: curved edges read as straight lines give approximated.curve (not for a layer of points); a dropped epoch gives the new dropped.epoch.
  • Versions: an unknown major version of the metadata is refused. 0.x, 1.x and 2.x are read.
  • Reads without notices: embeddings points are converted from the file's system. They and catalog index queries refuse a file whose places would be assumed or changed silently.

No new dependency, and no geospatial feature of the parquet crate. Definitions without a code are compared through terrio-crs. Memory: no second copy of a layer. The probe of coordinates read as longitude/latitude decodes at most the first 16 geometries, up to 1 MiB each, and only for a local file; the read that tells an untyped file's geometry kind is unchanged.

Reaches: desktop, browser, command line, Python and phone, through the shared reader; whole, streamed and by-address reads; DuckDB conversions read back through it. No command, parameter, ribbon or saved-project change.

Testing

  • Table tests with in-test writers for the forms above, with and without a notice, hostile CRS strings and remote reads. Run against the previous reader, the initial set failed in every test; cases added during review ran on this one only.
  • 13 files written by other libraries, added with the command line: native UTM files land in place, a native column named shape opens, and crs: null metres land in place after Define Projection.
  • The full Linux CI on this commit in the fork.

UI evidence

No visible UI change.

Related issue

None. The specifications: GeoParquet 2.0.0 and Parquet geospatial types.

Summary by CodeRabbit

  • New Features

    • Added support for reading more GeoParquet files, including files with native geometry or geography columns.
    • Improved geometry-column and coordinate-system handling, with notices or refusals when data cannot be safely interpreted.
    • Added notices for coordinate epoch loss and for curved edges represented as straight segments.
    • Exact reads refuse geometries with Z/M values and oversized row groups. Vector queries refuse points that cannot be placed in longitude/latitude, unsupported geometries, and coordinates outside longitude/latitude bounds.
  • Documentation

    • Expanded guidance on supported GeoParquet versions, coordinate systems, geometry encodings, and file limits.
    • Clarified the effects of missing or unusable coordinate systems and coordinate epoch loss.

Loading
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