Skip to content

raster: preserve missing NODATA in map algebra - #1100

Draft
Komzpa wants to merge 1 commit into
postgis:masterfrom
Komzpa:codex/ticket-2807-mapalgebra-nodata
Draft

Komzpa wants to merge 1 commit into
postgis:masterfrom
Komzpa:codex/ticket-2807-mapalgebra-nodata

Conversation

@Komzpa

@Komzpa Komzpa commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

  • keep n-raster map algebra callbacks able to emit output NODATA when source bands, missing requested bands, or selected extents can synthesize missing source pixels
  • use an existing source NODATA value as the output sentinel when later participating bands require callback output NODATA, so valid minimum-valued callback results are not hidden
  • treat absent requested expression/callback bands as iterator-provided NODATA sources so NULL results become output NODATA instead of raising
  • make expression-mode gap detection respect nodata1expr, nodata2expr, and nodatanodataval, so handled extent gaps can return valid minimum-valued pixels without reserving them as NODATA
  • make gap detection coverage-aware for FIRST, SECOND, LAST, and custom-style selected extents, while keeping UNION gap detection tied to actual source coverage
  • reserve the grayscale 255 sentinel only when source bands have NODATA or RGB rasters can actually synthesize gap pixels; covered FIRST extents and coextensive UNION white pixels remain valid 255 values
  • avoid stats-stretching native 8BUI grayscale inputs when a sentinel is reserved, using the full 0..255 domain instead
  • add regression coverage for later-band NODATA, missing requested bands, n-raster UNION gap/coextensive behavior, covered FIRST extents, handled extent gaps, handled source NODATA, 8BUI white-pixel collisions, and grayscale extent gaps for https://trac.osgeo.org/postgis/ticket/2807

Current State

  • rebased onto postgis/postgis@4e470f1534795ae4a4c52ad5ad35b8744af9d708
  • current head is 7cccf2a1faf2f4a636cd8001f94972540e510f8a
  • GitHub review threads: 8 total, 0 unresolved current threads

Validation

  • make -C raster/rt_pg -j32
  • make -C extensions/postgis_raster all -j1
  • sudo -n make -C extensions/postgis install
  • sudo -n make -C extensions/postgis_raster install
  • sudo -n make -C raster/rt_pg install
  • PGPASSWORD=postgres PGHOST=127.0.0.1 PGPORT=5432 PGUSER=kom PGDATABASE=postgres make -C raster/test check RUNTESTFLAGS='--extension --verbose' TESTS="$(pwd)/raster/test/regress/rt_mapalgebra $(pwd)/raster/test/regress/rt_grayscale"
  • ./utils/check_news.sh .
  • git diff --check upstream/master..HEAD
  • git clang-format --diff upstream/master -- raster/rt_pg/rtpg_mapalgebra.c

Closes https://trac.osgeo.org/postgis/ticket/2807

Supersedes closed PR #1056.

@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 9cbd749 to 9a6d2bc Compare June 21, 2026 09:56
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

RASTER_nMapAlgebra and RASTER_nMapAlgebraExpr in rtpg_mapalgebra.c replace single-band NODATA detection with a scan across all input rasters' selected bands, adding helpers to check if expression sources can emit NODATA and to verify gap-synthesis capability. Helper functions verify grid alignment. st_grayscale in rtpostgis.sql.in adds gap-synthesis logic and a reservenodata flag to preserve NODATA for non-INTERSECTION extents. Regression tests are added for both ST_Grayscale band-array behavior and ST_MapAlgebra operations, including extended coverage for UNION, FIRST, and callback-based scenarios.

Changes

ST_MapAlgebra / ST_Grayscale NODATA Preservation

Layer / File(s) Summary
Grid alignment and gap-synthesis helper functions
raster/rt_pg/rtpg_mapalgebra.c
Adds internal helper functions to check whether two rasters share the same grid extent/alignment and to decide whether gaps can be synthesized for n-raster MapAlgebra based on extenttype and participating rasters/bands.
Multi-band NODATA scan and expression-source helpers in C MapAlgebra functions
raster/rt_pg/rtpg_mapalgebra.c
RASTER_nMapAlgebra scans all input rasters' selected bands and sets arg->hasnodata to 1 if any band has NODATA, or conditionally if gap synthesis is possible, then copies the result to arg->callback.hasnodata. RASTER_nMapAlgebraExpr applies the same logic to arg->bandarg->hasnodata, with an additional new helper function rtpg_nmapalgebraexpr_source_can_emit_nodata that inspects configured rasters and expression sources to determine NODATA emission capability. Both functions keep nodataval assignment conditional on the initially selected band's NODATA flag.
ST_Grayscale reservenodata and gap-synthesis logic for non-INTERSECTION extents
raster/rt_pg/rtpostgis.sql.in
st_grayscale initializes can_synthesize_gaps and mapalgebra_extenttype variables. When extenttype is not INTERSECTION, it checks RGB band alignment and convex hull equality to compute can_synthesize_gaps. The reservenodata flag is set when any input band has NODATA or can_synthesize_gaps is true. Per-band reclassification triggers when either the pixel type differs or reservenodata is true, with a new branch that synthesizes summary-statistics bounds when pixel type already matches but nodata is null. The map algebra call uses mapalgebra_extenttype, and post-processing ST_SetBandNoDataValue condition is broadened to trigger on either hasnodata or can_synthesize_gaps.
ST_Grayscale regression tests and expected output
raster/test/regress/rt_grayscale.sql, raster/test/regress/rt_grayscale_expected
Adds five test queries: #2807.grayscale.8bui-nodata validates single-band NODATA preservation, #2807.grayscale.union-gap validates multi-band with gap synthesis, #2807.grayscale.union-coextensive-white validates coextensive union extent, #2807.grayscale.first-covered-white validates FIRST mode with coverage, and #2807.grayscale.first-gap-white validates FIRST mode with gaps. Each test asserts output nodatavalue and dumped value arrays; expected output records are added for all five variants.
ST_MapAlgebra n-map regression tests and expected output
raster/test/regress/rt_mapalgebra.sql, raster/test/regress/rt_mapalgebra_expected
Adds helper function raster_nmapalgebra_zero for callback testing. Introduces five test cases for Ticket #2807: #2807.nmap.union-coextensive and #2807.nmap.union-gap build two 1×1 16BUI rasters with NULL nodatavalue and apply ST_MapAlgebra with addition, validating union band nodatavalue and value arrays; #2807.nmap.first-covered uses FIRST operation with differing extents; two additional cases test INTERSECTION expression handling and callback-based source-nodata handling. Expected output records confirm union coextensive result ({{3}}), union-gap result (0 with {{NULL,NULL}}), first-covered result ({{3}}), and expression/callback-handled cases ({{0}}).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hippity-hop through rasters galore,
Each band now checked—not just one, but more!
Gaps synthesize smooth with alignment aligned,
NODATA reserved in the range redefined.
Expression and callback both handle with care—
A bunny's fix earns its well-deserved fare! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: preserving missing NODATA in map algebra operations, which is the central objective of the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description matches the raster map algebra and grayscale nodata-gap handling changes and added regression tests.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cbd74989f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread raster/rt_pg/rtpg_mapalgebra.c
Comment thread raster/rt_pg/rtpostgis.sql.in Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
raster/rt_pg/rtpostgis.sql.in (1)

4503-4518: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Reserve sentinel 255 using a global RGB decision, not per-band.

reservenodata is computed from each band’s own nodata, so in mixed cases (only one RGB band has NODATA) the other 8BUI bands can keep value 255. The grayscale formula can still round to 255, which then collides with the output NODATA sentinel once Line 4544 sets band NODATA to 255.

Use a pre-scan/global flag (any input band has NODATA OR non-INTERSECTION extent) and apply the 0..254 reclass to all three bands when reservation is needed.

Suggested patch sketch
-        hasnodata boolean DEFAULT FALSE;
-        reservenodata boolean;
+        hasnodata boolean DEFAULT FALSE;
+        reservenodata boolean DEFAULT FALSE;
+        _extenttype text;

@@
+        _extenttype := upper(coalesce(extenttype, 'INTERSECTION'));
+
+        -- First pass: detect whether any source band has NODATA
+        FOR idx IN 1.._NBANDS LOOP
+            rast := _set[idx].rast;
+            nband := _set[idx].nband;
+            nodata := `@extschema`@.ST_BandNoDataValue(rast, nband);
+            IF nodata IS NOT NULL THEN
+                hasnodata := TRUE;
+                EXIT;
+            END IF;
+        END LOOP;
+
+        reservenodata := hasnodata OR _extenttype != 'INTERSECTION';
+
+        -- Second pass: normalize/reclass each band
         FOR idx IN 1.._NBANDS LOOP
@@
-            reservenodata := nodata IS NOT NULL OR upper(extenttype) != 'INTERSECTION';
-
             IF `@extschema`@.ST_BandPixelType(rast, nband) != _PIXTYPE OR reservenodata THEN
@@
-        IF hasnodata OR upper(extenttype) != 'INTERSECTION' THEN
+        IF reservenodata THEN
             grayscale := `@extschema`@.ST_SetBandNoDataValue(grayscale, 1, _NODATA);
         END IF;

Also applies to: 4544-4544

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@raster/rt_pg/rtpostgis.sql.in` around lines 4503 - 4518, The `reservenodata`
flag is currently computed per-band based on each individual band's nodata
value, which causes a collision when different RGB bands have different nodata
settings and the grayscale formula rounds to 255. Create a global pre-scan flag
that checks if ANY input band has NODATA OR the extent type is not INTERSECTION,
before the per-band loop. Use this global flag to apply the 0..254 reclass (the
reclassexpr logic) consistently to all three bands when reservation is needed,
rather than making per-band decisions. This ensures that when reservation is
triggered for any reason, all bands get the same restrictive 0..254 range to
prevent collisions with the sentinel value 255 set at line 4544.
🧹 Nitpick comments (1)
raster/rt_pg/rtpg_mapalgebra.c (1)

940-949: ⚡ Quick win

Run clang-format on these new loop hunks.

The added for loops use a standalone brace style that doesn’t match the surrounding C style and likely won’t survive clang-format unchanged. As per coding guidelines, “Format C and C++ code using clang-format, running it only on relevant hunks before submitting patches to avoid unrelated churn.”

Suggested formatting-only adjustment
-	for (i = 0; i < arg->numraster && !arg->hasnodata; i++)
-	{
+	for (i = 0; i < arg->numraster && !arg->hasnodata; i++) {
 		rt_band bandi;
-	for (i = 0; i < numraster && !arg->bandarg->hasnodata; i++)
-	{
+	for (i = 0; i < numraster && !arg->bandarg->hasnodata; i++) {
 		rt_band bandi;

Also applies to: 1655-1664

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@raster/rt_pg/rtpg_mapalgebra.c` around lines 940 - 949, The for loop starting
with `for (i = 0; i < arg->numraster && !arg->hasnodata; i++)` and the related
loop at lines 1655-1664 use a brace style that doesn't match the project's C
coding style guidelines. Run clang-format on these specific loop hunks to ensure
the formatting aligns with the project's standards and coding conventions.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@raster/rt_pg/rtpostgis.sql.in`:
- Around line 4503-4518: The `reservenodata` flag is currently computed per-band
based on each individual band's nodata value, which causes a collision when
different RGB bands have different nodata settings and the grayscale formula
rounds to 255. Create a global pre-scan flag that checks if ANY input band has
NODATA OR the extent type is not INTERSECTION, before the per-band loop. Use
this global flag to apply the 0..254 reclass (the reclassexpr logic)
consistently to all three bands when reservation is needed, rather than making
per-band decisions. This ensures that when reservation is triggered for any
reason, all bands get the same restrictive 0..254 range to prevent collisions
with the sentinel value 255 set at line 4544.

---

Nitpick comments:
In `@raster/rt_pg/rtpg_mapalgebra.c`:
- Around line 940-949: The for loop starting with `for (i = 0; i <
arg->numraster && !arg->hasnodata; i++)` and the related loop at lines 1655-1664
use a brace style that doesn't match the project's C coding style guidelines.
Run clang-format on these specific loop hunks to ensure the formatting aligns
with the project's standards and coding conventions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1d2f8947-df90-4f2b-8ed4-804f47783db6

📥 Commits

Reviewing files that changed from the base of the PR and between 986bb6a and 9a6d2bc.

📒 Files selected for processing (4)
  • raster/rt_pg/rtpg_mapalgebra.c
  • raster/rt_pg/rtpostgis.sql.in
  • raster/test/regress/rt_grayscale.sql
  • raster/test/regress/rt_grayscale_expected

@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch 2 times, most recently from 2da5cdd to 00ffea3 Compare June 21, 2026 14:03

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
raster/rt_pg/rtpostgis.sql.in (1)

4527-4538: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid stats-stretching native 8BUI bands when reserving 255.

Line 4527 now reclassifies already-8BUI bands whenever reservenodata is true, but lines 4533-4538 map stats.min..stats.max into 0..254. For native RGB input, that changes valid color values whenever the data range is narrower than 0..255; reserve the sentinel over the full 8BUI domain instead, and keep stats-based normalization for non-8BUI inputs.

🐛 Proposed fix
 		nodata double precision;
 		nodataval integer;
+		pixtype text;
 		reclassexpr text;
 		hasnodata boolean DEFAULT FALSE;
@@
-			IF `@extschema`@.ST_BandPixelType(rast, nband) != _PIXTYPE OR reservenodata THEN
-				stats := `@extschema`@.ST_SummaryStats(rast, nband);
+			pixtype := `@extschema`@.ST_BandPixelType(rast, nband);
+			IF pixtype != _PIXTYPE OR reservenodata THEN
+				IF pixtype = _PIXTYPE THEN
+					stats.min := 0;
+					stats.max := _NODATA;
+				ELSE
+					stats := `@extschema`@.ST_SummaryStats(rast, nband);
+				END IF;
 
 				IF nodata IS NOT NULL THEN
 					nodataval := _NODATA;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@raster/rt_pg/rtpostgis.sql.in` around lines 4527 - 4538, The condition at
line 4527 incorrectly applies stats-based remapping whenever reservenodata is
true, even for native 8BUI bands, which changes valid color values when the data
range is narrower than 0..255. Modify the condition to only apply stats-based
normalization for non-8BUI inputs by adding an additional check to determine if
the band is a native 8BUI type. When the band is already 8BUI and reservenodata
is true, skip the stats calculation and reclassification in lines 4533-4538 and
instead simply set nodataval to _NODATA without remapping the data, preserving
the original color values while reserving 255 as the sentinel.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@raster/rt_pg/rtpostgis.sql.in`:
- Around line 4527-4538: The condition at line 4527 incorrectly applies
stats-based remapping whenever reservenodata is true, even for native 8BUI
bands, which changes valid color values when the data range is narrower than
0..255. Modify the condition to only apply stats-based normalization for
non-8BUI inputs by adding an additional check to determine if the band is a
native 8BUI type. When the band is already 8BUI and reservenodata is true, skip
the stats calculation and reclassification in lines 4533-4538 and instead simply
set nodataval to _NODATA without remapping the data, preserving the original
color values while reserving 255 as the sentinel.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 115c8019-da1a-402c-be7e-d0303d2de9ca

📥 Commits

Reviewing files that changed from the base of the PR and between 9a6d2bc and 2da5cdd.

📒 Files selected for processing (4)
  • raster/rt_pg/rtpg_mapalgebra.c
  • raster/rt_pg/rtpostgis.sql.in
  • raster/test/regress/rt_grayscale.sql
  • raster/test/regress/rt_grayscale_expected
🚧 Files skipped from review as they are similar to previous changes (2)
  • raster/test/regress/rt_grayscale.sql
  • raster/rt_pg/rtpg_mapalgebra.c

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00ffea3a13

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread raster/rt_pg/rtpg_mapalgebra.c Outdated
Comment thread raster/rt_pg/rtpostgis.sql.in Outdated
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jun 22, 2026
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 00ffea3 to 44ccf5b Compare June 22, 2026 00:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44ccf5bca1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread raster/rt_pg/rtpg_mapalgebra.c Outdated
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jun 22, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 44ccf5b to 4ebfc54 Compare June 22, 2026 02:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ebfc54069

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread raster/rt_pg/rtpg_mapalgebra.c

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@raster/rt_pg/rtpg_mapalgebra.c`:
- Around line 1116-1122: The current code at line 1117 initializes
arg->hasnodata based only on the selected reference band using
rt_band_get_hasnodata_flag(band), which fails to account for NODATA metadata on
other participating bands in the map algebra operation. Before finalizing
arg->callback.hasnodata, scan through all participating bands (accessible via
arg->raster and arg->hasband) and check if any of them have NODATA flags set
using rt_band_get_hasnodata_flag. If any participating band has NODATA metadata,
ensure arg->hasnodata is set to 1 to properly indicate that the callback output
may produce NULL values from those sources.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a9537bf-e034-4e05-be8c-fbf42d8ecccb

📥 Commits

Reviewing files that changed from the base of the PR and between 44ccf5b and 4ebfc54.

📒 Files selected for processing (6)
  • raster/rt_pg/rtpg_mapalgebra.c
  • raster/rt_pg/rtpostgis.sql.in
  • raster/test/regress/rt_grayscale.sql
  • raster/test/regress/rt_grayscale_expected
  • raster/test/regress/rt_mapalgebra.sql
  • raster/test/regress/rt_mapalgebra_expected
✅ Files skipped from review due to trivial changes (1)
  • raster/test/regress/rt_grayscale_expected
🚧 Files skipped from review as they are similar to previous changes (2)
  • raster/rt_pg/rtpostgis.sql.in
  • raster/test/regress/rt_grayscale.sql

Comment thread raster/rt_pg/rtpg_mapalgebra.c
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jun 22, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 4ebfc54 to 75a13b6 Compare June 22, 2026 03:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75a13b621c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread raster/rt_pg/rtpg_mapalgebra.c Outdated
@Komzpa
Komzpa marked this pull request as draft June 22, 2026 06:44
@robe2 robe2 added the bug fix label Jun 23, 2026
@robe2
robe2 requested review from pramsey and robe2 June 23, 2026 06:49
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jun 24, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 75a13b6 to 799af10 Compare June 24, 2026 21:47
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jun 30, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 799af10 to 7cccf2a Compare June 30, 2026 21:57
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jul 1, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 7cccf2a to 03c0968 Compare July 1, 2026 06:02
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jul 9, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 03c0968 to 452c0dd Compare July 9, 2026 12:39
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jul 17, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 452c0dd to 13c8b3b Compare July 17, 2026 22:40
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jul 27, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 13c8b3b to 78dac12 Compare July 27, 2026 21:26
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jul 28, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 78dac12 to 35c1574 Compare July 28, 2026 01:50
Komzpa added a commit to Komzpa/postgis that referenced this pull request Jul 28, 2026
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from 35c1574 to cdfa181 Compare July 28, 2026 22:11
Keep map algebra outputs from reserving a NODATA value when source NODATA values are handled by the expression or callback path, while still reserving NODATA for synthesized extent gaps or unhandled source NODATA.

Closes #2807

Closes postgis#1100
@Komzpa
Komzpa force-pushed the codex/ticket-2807-mapalgebra-nodata branch from cdfa181 to cf5f99b Compare August 2, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants