Opened 8 years ago
Last modified 5 years ago
#3192 new enhancement
add a coalesce function to r.mapcalc
| Reported by: | aroche | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.6.2 |
| Component: | Raster | Version: | unspecified |
| Keywords: | r.mapcalc, coalesce, isnull, r.patch | Cc: | |
| CPU: | Unspecified | Platform: | Unspecified |
Description
A coalesce function that returns the first of its non-null arguments would be very useful: instead of using if(isnull(A), x, A)) we could write coalesce(A, x)
Change History (6)
comment:1 by , 7 years ago
| Component: | Default → Raster |
|---|---|
| Keywords: | r.mapcalc coalesce isnull r.patch added |
| Milestone: | 7.0.6 → 7.4.0 |
comment:3 by , 6 years ago
| Milestone: | 7.4.1 → 7.4.2 |
|---|
comment:4 by , 6 years ago
| Milestone: | 7.4.2 → 7.6.0 |
|---|
All enhancement tickets should be assigned to 7.6 milestone.
Note:
See TracTickets
for help on using tickets.

Workaround: The same functionality is available through G7:r.patch.
PostgreSQL definition of function COALESCE(value [, ...])
SQLite definition of function coalesce(X,Y,...):
SQLite definition of a similar function ifnull(X,Y):
SQLite definition of a function with a similar name nullif(X,Y):