Skip to content

Support for Web Clients? #291

Description

@mmgeorge

Hi! We've been working on adding display optimization that builds on top of GeoParquet, with the goal of enabling web clients to read and visualize GeoParquet files directly by streaming via range requests. I was wondering if there was any interest in standardizing any of this into the GeoParquet spec directly.

The approach we're using I think is actually pretty straightforward:

  • For points we simply cluster the dataset using Z-order.
  • For non-points, we cluster using an XZ-order code derived from feature extents, using the approach outlined in https://doi.org/10.1007/3-540-48482-5_7. Then we generate several multiscale columns that include quantized, delta-encoded geometries to handle different LODs. We write these multiscale columns, and the XZ-key, as an additional structured column.

Because the XZ-code is an actual column, clients can use statistics to query the XZ-code ranges relevant for a given spatial query (like an on-screen display tile). Provided the file was generated with a Page Index (we currently require this), we are seeing pretty decent performance.

This is the full Overture building footprints dataset, (2.7 billion features spread across 16 files, each about ~25 GB):

footprints2.mp4

Overture Building Footprints

And here's a single file containing 2010 US Census Blocks (11 million features in a single 10 GB file):

census2.mp4

Census Blocks

Right now we are storing this provisional "Spatial Optimization" metadata as a key-value pair in addition to the GeoParquet metadata (which covers the full resolution geometry).

I noticed there's some other exploratory work going on in this area (#279). Where this approach potentially differs from that is that while clustering spatially in this way does lead to better spatial query performance by colocating nearby features, it does fundamentally come at the expense of other variables you might want to cluster on. Storing additional LOD columns also means increasing the size of your dataset, so there are some real tradeoffs here. That said, if your data is spatial and you are using spatial filtering or performing spatial analysis, I imagine standard query engine predicate skipping should be able to benefit from this as well, provided we also write per-feature bounds that they could take advantage of (right now we are not doing this).

I was following some of the Iceberg / native geospatial types discussions, and I think clustering by XZ-code is something that was being explored there as well? So it seems like there might be some standardization possible here. I'm also planning to look at spatio-temporal clustering, something like a Z(XZ,T) for discrete, or XZ(x0, x1, y0, y1, t0, t1) for time intervals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions