Ticket #1639 (closed defect: fixed)
[raster] MapAlgebraExpr can't handle conditions
| Reported by: | nicklas | Owned by: | pracine |
|---|---|---|---|
| Priority: | high | Milestone: | PostGIS 2.0.0 |
| Component: | raster | Version: | trunk |
| Keywords: | Cc: |
Description
When running the example for the one raster version of MapAlgebraExpr:
UPDATE dummy_rast SET map_rast2 = ST_MapAlgebraExpr(rast,'2BUI','CASE WHEN [rast] BETWEEN 100 and 250 THEN 1 WHEN [rast] = 252 THEN 2 WHEN [rast] BETWEEN 253 and 254 THEN 3 ELSE 0 END', '0') WHERE rid = 2;
I don't get the values 1, 2, 3 and 0.
When I run, as in the example.
SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, j) As mapval FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN generate_series(1,5) AS j WHERE rid = 2;
I get:
origval;mapval 249; 250; 251; 252; 253; 254;
It is beta1
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

