Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API, Core: Add geometry and geography types support #12346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kontinuation
Copy link
Member

This adds 2 primitive types to iceberg-api and iceberg-core for supporting geospatial data types, partially implementing the iceberg geo spec: #10981

The newly added primitive types are:

  • geometry(C): geometries with linear/planar edge interpolation
  • geography(C, A): geometries with non-linear edge interpolation, the algorithm for interpolating edges is parameterized by A.

This patch also adds 2 expressions for filtering spatial values:

  • ST_INTERSECT(geom1: geometry, geom2: geometry) or ST_INTERSECT(geog1: geography, geog2: geography): test if 2 spatial objects intersect with each other.
  • ST_COVERS(geom1: geometry, geom2: geometry) or ST_COVERS(geog1: geography, geog2: geography): test if one spatial object completely covers the other spatial object.

Currently we have implemented these 2 expressions for geometry values, the implementation for geography values is not fully implemented yet. We are looking into supporting geography with spherical edge interpolation algorithm using approaches similar to https://github.com/paleolimbot/s2geography.

@jiayuasu
Copy link
Member

@rdblue @szehon-ho @flyrain please review when you have time 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants