<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><div><span style="font-family: times, serif; font-size: 12pt; ">Hello,</span><br></div><div class="yui_3_2_0_22_132725134565854" style="font-size: 12pt; "><div class="yui_3_2_0_22_132725134565861" style="font-size: 12pt; "><div id="yiv1694752926"><div><div class="yui_3_2_0_22_132725134565869" style="font-size: 12pt; "><div class="yui_3_2_0_22_132725134565879" style="font-family: times, serif; font-size: 12pt; "><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><br>I am a M.Sc. student and currently working with postgreSQL/PostGIS to handle  raster.  I have installed PostgreSQl  9.0 and PostGIS 2.0 in  windows 7  home premium OS. I had no problem on handling raster so far but now I got problem while accessing ST_MapAlgebraExpr () function  which takes
 two rasters as function arguments. I have followed the example provided in the link below as follows.</div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><br></div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; ">First, I create the table as given,</div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><br></div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><pre class="programlisting" style="border-right-width: 0px; border-left-width: 0px; border-bottom-width: 2px; border-top-width: 2px; font-family: 'Courier New', Courier, Monaco, monospace; line-height: 16px; border-top-color: rgb(247, 147, 30); border-right-color: rgb(247, 147, 30); border-bottom-color: rgb(247, 147, 30); border-left-color: rgb(247, 147, 30); border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; font-size: 11px; margin-bottom: 10px; margin-top:
 10px; overflow-x: auto; overflow-y: auto; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; color: rgb(46, 46, 46); ">CREATE TABLE fun_shapes(rid serial PRIMARY KEY, fun_name text, rast raster);</pre>Then, the second syntax to insert raster and finally the use of the function ST_MapAlgebraExpr()  as.</div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><pre class="programlisting" style="border-right-width: 0px; border-left-width: 0px; border-bottom-width: 2px; border-top-width: 2px; font-family: 'Courier New', Courier, Monaco, monospace; line-height: 16px; border-top-color: rgb(247, 147, 30); border-right-color: rgb(247, 147, 30); border-bottom-color: rgb(247,
 147, 30); border-left-color: rgb(247, 147, 30); border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; font-size: 11px; margin-bottom: 10px; margin-top: 10px; overflow-x: auto; overflow-y: auto; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; color: rgb(46, 46, 46); ">SELECT  ST_MapAlgebraExpr(
                area.rast, bub.rast, 'rast2', '8BUI', 'INTERSECTION', 'rast2', 'rast1') As interrast,
                ST_MapAlgebraExpr(
                        area.rast, bub.rast, 'rast2', '8BUI', 'UNION', 'rast2', 'rast1') As unionrast
FROM 
  (SELECT rast FROM fun_shapes WHERE
 fun_name = 'area') As area
CROSS JOIN  (SELECT rast 
FROM fun_shapes WHERE
 fun_name = 'rand bubbles') As bub</pre></div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><span style="font-size: 12pt; "> </span><br></div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "> <a rel="nofollow" target="_blank" href="http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraExpr2.html">http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraExpr2.html</a><br><br></div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; ">But I got error on using this syntax as:<br><br>ERROR:  function st_mapalgebraexpr(raster, raster, unknown, unknown,  unknown, unknown, unknown) does not exist<br> LINE 58: SELECT  ST_MapAlgebraExpr()<br>  HINT:  No function matches the given name and argument types. You might need to add explicit type casts.<br><span style="font-size: 12pt; "><br></span></div><div
 class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><span style="font-size: 12pt; "> Although I am new to this database, I think that there is problem with </span><span style="font-size: 12pt; "> PostGIS 2.0 to support the function. If this the case which version I have </span><span style="font-size: 12pt; "> to install to use this function. Can anyone provide me solution for it.</span></div><div class="yui_3_2_0_22_132725134565881" style="font-size: 12pt; "><br> Thanks<br><br> With Best Regards,<br> Deepak<br><br></div></div></div></div></div></div></div></div></div></body></html>