[postgis-devel] [PostGIS] #1317: [raster] CASE expression causes ST_MapAlgebra for 2 raster to fail
PostGIS
trac at osgeo.org
Mon Nov 21 11:23:21 PST 2011
#1317: [raster] CASE expression causes ST_MapAlgebra for 2 raster to fail
----------------------------+-----------------------------------------------
Reporter: pracine | Owner: pracine
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis raster | Version: trunk
Keywords: |
----------------------------+-----------------------------------------------
Description changed by pracine:
Old description:
> This query:
>
> {{{
> SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1,
> 0, 0, -1), '32BF'::text, 6, -1), 1,
> ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1,
> 0, 0, -1), '32BF'::text, 4, -1), 1,
> 'CASE WHEN rast2 > 0 THEN rast1 / rast2 ELSE
> NULL END'::text,
> NULL::text,
> 'UNION'::text,
> NULL::text,
> NULL::text,
> NULL::double precision)
> }}}
>
> produces this error"
>
> {{{
> ERROR: column "rast2" does not exist
> LINE 1: SELECT (CASE WHEN $2 > 0 THEN $1 / RAST2 ELSE NULL END)::dou...
> ^
> QUERY: SELECT (CASE WHEN $2 > 0 THEN $1 / RAST2 ELSE NULL END)::double
> precision
>
> ********** Error **********
>
> ERROR: column "rast2" does not exist
> SQL state: 42703
> }}}
>
> There seems to be a problem when parsing CASE expressions...
>
> I was testing ST_Union()...
New description:
This query:
{{{
SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1,
0, 0, -1), '32BF'::text, 6, -1), 1,
ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1,
0, 0, -1), '32BF'::text, 4, -1), 1,
'CASE WHEN rast2 > 0 THEN rast1 / rast2 ELSE NULL
END'::text,
NULL::text,
'UNION'::text,
NULL::text,
NULL::text,
NULL::double precision)
}}}
produces this error:
{{{
ERROR: column "rast2" does not exist
LINE 1: SELECT (CASE WHEN $2 > 0 THEN $1 / RAST2 ELSE NULL END)::dou...
^
QUERY: SELECT (CASE WHEN $2 > 0 THEN $1 / RAST2 ELSE NULL END)::double
precision
********** Error **********
ERROR: column "rast2" does not exist
SQL state: 42703
}}}
There seems to be a problem when parsing CASE expressions...
I was testing ST_Union()...
--
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1317#comment:1>
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