[postgis-devel] [PostGIS] #1639: MapAlgebraExpr can't handle conditions
PostGIS
trac at osgeo.org
Wed Feb 29 14:24:28 PST 2012
#1639: MapAlgebraExpr can't handle conditions
---------------------+------------------------------------------------------
Reporter: nicklas | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
When running the example for the one raster version of
[http://postgis.org/documentation/manual-svn/RT_ST_MapAlgebraExpr.html
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
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1639>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list