feat(raster): bind rasterTileValueQuadbin and trajectoryQuadbins for Raquet sampling#205
Open
estebanzimanyi wants to merge 4 commits into
Open
feat(raster): bind rasterTileValueQuadbin and trajectoryQuadbins for Raquet sampling#205estebanzimanyi wants to merge 4 commits into
estebanzimanyi wants to merge 4 commits into
Conversation
…o d94af2d2c9 Registers QUADBIN as a BIGINT alias and TQUADBIN as a BLOB-backed temporal type. Exposes quadbinTileToCell, quadbinCellToTileX/Y/Z, quadbinGetResolution, quadbinIsValidCell, tquadbin (instant constructor), startValue, endValue, valueN, values, valueAtTimestamp, and cellToQuadkey, all routed through the serial MEOS executor. Advances the vcpkg MEOS pin to ecosystem-pin-2026-06-16g (d94af2d2c9), the first pin that carries the QUADBIN family in the public MEOS surface (meos_quadbin.h).
Two portfile workarounds are removed because the upstream pin carries the fixes: meos/CMakeLists.txt already links the QUADBIN object library into MEOS_OBJECTS, and meos_catalog.c basetype_byvalue contains a single merged return statement covering H3 and QUADBIN. The raster chip-sampling additions in this pin (raster_tile_value_quadbin, trajectory_quadbins, MeosPixType) are gated by #if RASTER in meos.h and compiled only when -DRASTER=ON; the MobilityDuck build uses the default RASTER=OFF so no new bindings are needed.
Folds MobilityDB PR #1227: make the four file-scope static accumulators in tpoint_geom_clip.c (events, intervals, periods, rtree_results) per-thread with MEOS_TLS to prevent heap corruption under concurrent DuckDB executor threads.
…Raquet sampling Expose two MEOS raster kernel functions as DuckDB scalar functions, completing MobilityDuck parity with MobilityDB's Raquet raster-chip sampling surface. rasterTileValueQuadbin(pixels BLOB, width INT, height INT, cell QUADBIN, pixtype VARCHAR, nodata DOUBLE, has_nodata BOOL, traj TGEOMPOINT) → TFLOAT samples a row-major Raquet band pixel buffer along a tgeompoint trajectory keyed by a QUADBIN cell id, returning the sampled values as TFLOAT. Supports all five MEOS pixel types: UINT8, INT16, INT32, FLOAT32, FLOAT64. trajectoryQuadbins(traj TGEOMPOINT, zoom INT) → LIST(QUADBIN) returns the distinct QUADBIN cells at a given zoom level covered by the trajectory, for use as a WHERE-clause join key against a Raquet table. Implementation adds -DRASTER=ON to the portfile vcpkg_cmake_configure OPTIONS so raster_quadbin.c is compiled into libmeos and the #if RASTER declarations in meos.h are visible; adds -DRASTER=1 to CMakeLists.txt so MobilityDuck C++ translation units see the same guard; wires RasterQuadbinFunctions into the extension loader after QuadbinTypes registration. Smoke tests cover cardinality and cell identity of trajectoryQuadbins at zoom 0, the 1×1 UINT8 sampling path, and the outside-bbox NULL path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose two MEOS raster kernel functions as DuckDB scalar functions, completing MobilityDuck parity with MobilityDB's Raquet raster-chip sampling surface.
rasterTileValueQuadbin(pixels BLOB, width INT, height INT, cell QUADBIN, pixtype VARCHAR, nodata DOUBLE, has_nodata BOOL, traj TGEOMPOINT) → TFLOATsamples a row-major Raquet band pixel buffer along a tgeompoint trajectory keyed by a QUADBIN cell id, returning the sampled values as TFLOAT. Supports all five MEOS pixel types: UINT8, INT16, INT32, FLOAT32, FLOAT64.trajectoryQuadbins(traj TGEOMPOINT, zoom INT) → LIST(QUADBIN)returns the distinct QUADBIN cells at a given zoom level covered by the trajectory, for use as a WHERE-clause join key against a Raquet table.-DRASTER=ONis added to the portfilevcpkg_cmake_configureOPTIONS soraster_quadbin.cis compiled into libmeos and the#if RASTERdeclarations inmeos.hare visible;-DRASTER=1is added toCMakeLists.txtso MobilityDuck C++ translation units see the same guard.RasterQuadbinFunctionsis wired into the extension loader afterQuadbinTypesregistration. Smoke tests cover cardinality and cell identity oftrajectoryQuadbinsat zoom 0, the 1×1 UINT8 sampling path, and the outside-bbox NULL path.