Skip to content

Generate the raster processing functions from the catalog - #504

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:gen/raster-base-transf
Oct 26, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:gen/raster-base-transf

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

The generator retires meos_raster_base_transf, so the calls the catalog places register transform, transformPipeline, rescale, slope, tpi, tri, reclass, mapAlgebra and clip in the forms their trailing defaults allow.

shape_sig_call binds an argument declared DEFAULT NULL whose wrapper passes a NULL pointer for a NULL argument to nullptr, and a NULL row skips its decoding, as Raster_map_algebra passes NULL for a NULL customextent or pixeltype. It reads a geometry argument in the SRID of the one raster the call reads before it (SIG_SRID_OF), as the geo shapes read a geometry in the SRID of the temporal value, the CRS of a typed GEOMETRY('EPSG:n') read at no geometry argument, and a length the signature binds takes its literal with its array: clip(rast, geom) binds bands NULL and nbands 0.

RETIRE_UNCOVERED_OK names the four functions of the group the generator does not reach: dumpAsPolygons, pixelAsPoints and dumpValues, whose rows of GeomVal, of Pixel and of values with nodata flags no shape returns, and setValues, whose two-dimensional array gives the width and height of the block, C parameters no SQL argument of its signature fills.

Witness: on the branch this one stacks on, duckdb_functions() lists no clip, mapAlgebra, transform, rescale, slope, tpi, tri or reclass over raster. Here clip(r, 'POLYGON((0 1,2 1,2 3,0 3,0 1))'::GEOMETRY) over the depth raster test/sql/raster.test reads answers the 2x2 raster of pixels 10, 20, 40, 50 MobilityDB's raster regression test answers, the triangle POLYGON((0 3,1.8 3,0 1.2,0 3)) keeps pixel 10 by centre and 10, 20, 40 by touch as it answers them, and mapAlgebra(r, 1, 'SUM', '64BF', 'CUSTOM', makeEmptyRaster(2, 2, 1.0, 3.0, 1.0, -1.0, 0.0, 0.0, 3857), 1, 1) its sums 190, 280, 235, 325.

Measured over the catalog of MobilityDB master 78673b2106, whose headers are those of the pinned f89cf61f1b (the commits between them change the manual only): the generator registers 46 functions more than the branch it stacks on, none removed: clip 3, mapAlgebra 6, reclass 2, rescale 3, slope 11, tpi 3, transform 8, transformPipeline 7, tri 3. No hand registration names any of them.

The generator retires meos_raster_base_transf, so the calls the catalog places register transform, transformPipeline, rescale, slope, tpi, tri, reclass, mapAlgebra and clip in the forms their trailing defaults allow.

shape_sig_call binds an argument declared DEFAULT NULL whose wrapper passes a NULL pointer for a NULL argument to nullptr, and a NULL row skips its decoding, as Raster_map_algebra passes NULL for a NULL customextent or pixeltype. It reads a geometry argument in the SRID of the one raster the call reads before it (SIG_SRID_OF), as the geo shapes read a geometry in the SRID of the temporal value, the CRS of a typed GEOMETRY('EPSG:n') read at no geometry argument, and a length the signature binds takes its literal with its array: clip(rast, geom) binds bands NULL and nbands 0.

RETIRE_UNCOVERED_OK names the four functions of the group the generator does not reach: dumpAsPolygons, pixelAsPoints and dumpValues, whose rows of GeomVal, of Pixel and of values with nodata flags no shape returns, and setValues, whose two-dimensional array gives the width and height of the block, C parameters no SQL argument of its signature fills.

Witness: on the branch this one stacks on, duckdb_functions() lists no clip, mapAlgebra, transform, rescale, slope, tpi, tri or reclass over raster. Here clip(r, 'POLYGON((0 1,2 1,2 3,0 3,0 1))'::GEOMETRY) over the depth raster test/sql/raster.test reads answers the 2x2 raster of pixels 10, 20, 40, 50 MobilityDB's raster regression test answers, the triangle POLYGON((0 3,1.8 3,0 1.2,0 3)) keeps pixel 10 by centre and 10, 20, 40 by touch as it answers them, and mapAlgebra(r, 1, 'SUM', '64BF', 'CUSTOM', makeEmptyRaster(2, 2, 1.0, 3.0, 1.0, -1.0, 0.0, 0.0, 3857), 1, 1) its sums 190, 280, 235, 325.

Measured over the catalog of MobilityDB master 78673b2106, whose headers are those of the pinned f89cf61f1b (the commits between them change the manual only): the generator registers 46 functions more than the branch it stacks on, none removed: clip 3, mapAlgebra 6, reclass 2, rescale 3, slope 11, tpi 3, transform 8, transformPipeline 7, tri 3. No hand registration names any of them.
@estebanzimanyi
estebanzimanyi merged commit 4409ab8 into MobilityDB:main Oct 26, 2026
9 checks passed
@estebanzimanyi
estebanzimanyi deleted the gen/raster-base-transf branch October 26, 2026 09:09
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