Skip to content

feat(parity): static-geometry h3indexset prefilter (geoToH3IndexSet + everEq)#198

Open
estebanzimanyi wants to merge 1 commit into
MobilityDB:feat/parity-th3indexfrom
estebanzimanyi:feat/parity-h3-static-prefilter
Open

feat(parity): static-geometry h3indexset prefilter (geoToH3IndexSet + everEq)#198
estebanzimanyi wants to merge 1 commit into
MobilityDB:feat/parity-th3indexfrom
estebanzimanyi:feat/parity-h3-static-prefilter

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Jun 10, 2026

Copy link
Copy Markdown
Member

Expose the static-geometry h3indexset prefilter that narrows a th3index candidate set before the exact spatial test. geoToH3IndexSet(GEOMETRY, INTEGER) returns the Set of H3 cells covering the geometry in EPSG:4326; everEq(H3INDEXSET, TH3INDEX) tests whether a th3index trajectory ever equals any cell in that set, backed by ever_eq_anyof_h3indexset_th3index from the canonical MEOS surface. Both functions derive their DuckDB camelCase names from the MEOS snake_case symbols by the per-binding mechanical rule.

@estebanzimanyi estebanzimanyi force-pushed the feat/parity-h3-static-prefilter branch from 9c6e88b to 790f375 Compare June 10, 2026 19:22
H3INDEXSET is a Set<H3INDEX> blob covering a static geometry at a given
H3 resolution.  Two new UDFs accelerate trip × static cross-join queries
(BerlinMOD Q4, Q7, Q11, Q12, Q15, Q17):

- geoToH3IndexSet(GEOMETRY, INTEGER) → H3INDEXSET: covers POINT,
  LINESTRING, POLYGON, MULTI*, and GeomCollection input in EPSG:4326.
- everEq(H3INDEXSET, TH3INDEX) → BOOLEAN: true when the trajectory ever
  passes through any cell of the static set; overloads the existing
  everEq family.

Q7-style intersection on BerlinMOD sf 0.005: 0.517 s without prefilter,
0.076 s with prefilter (6.8×).
@estebanzimanyi estebanzimanyi force-pushed the feat/parity-h3-static-prefilter branch from 790f375 to db28572 Compare June 10, 2026 20:11
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