<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16440"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=674135703-23012012><FONT color=#0000ff 
size=2 face=Arial>Hmm I meant 2012-01-01</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> 
  postgis-users-bounces@postgis.refractions.net 
  [mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
  </B>Paragon Corporation<BR><B>Sent:</B> Sunday, January 22, 2012 10:48 
  PM<BR><B>To:</B> 'PostGIS Users Discussion'<BR><B>Subject:</B> Re: 
  [postgis-users] ST_MapAlgebraExpr() Function<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012>Just tried it on my latest build which is about a 
  week old (a little newer than the windows build currently on site but much 
  older than when this doc section was written).  Works fine for 
  me.</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012></SPAN></FONT> </DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012>Which version of PostGIS are you 
  using?</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012></SPAN></FONT> </DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012>Run this command:</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012> select postgis_scripts_build_date(), 
  postgis_raster_lib_build_date();</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012></SPAN></FONT> </DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012>Make sure both return a value later than 
  2011-01-01</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012></SPAN></FONT> </DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012>Hope that helps,</SPAN></FONT></DIV>
  <DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
  class=738234203-23012012>Regina</SPAN></FONT></DIV><BR>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
  dir=ltr>
    <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
    <HR tabIndex=-1>
    <FONT size=2 face=Tahoma><B>From:</B> 
    postgis-users-bounces@postgis.refractions.net 
    [mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
    </B>Deepak R aj Awasthi<BR><B>Sent:</B> Sunday, January 22, 2012 12:13 
    PM<BR><B>To:</B> postgis-users@postgis.refractions.net<BR><B>Subject:</B> 
    [postgis-users] ST_MapAlgebraExpr() Function<BR></FONT><BR></DIV>
    <DIV></DIV>
    <DIV 
    style="BACKGROUND-COLOR: #fff; FONT-FAMILY: times new roman, new york, times, serif; COLOR: #000; FONT-SIZE: 12pt">
    <DIV>
    <DIV><SPAN 
    style="FONT-FAMILY: times, serif; FONT-SIZE: 12pt">Hello,</SPAN><BR></DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565854>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565861>
    <DIV id=yiv1694752926>
    <DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565869>
    <DIV style="FONT-FAMILY: times, serif; FONT-SIZE: 12pt" 
    class=yui_3_2_0_22_132725134565879>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><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 style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><BR></DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881>First, I 
    create the table as given,</DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><BR></DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><PRE style="BORDER-BOTTOM: rgb(247,147,30) 2px solid; BORDER-LEFT: rgb(247,147,30) 0px solid; PADDING-BOTTOM: 10px; LINE-HEIGHT: 16px; OVERFLOW-X: auto; OVERFLOW-Y: auto; MARGIN-TOP: 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; FONT-FAMILY: 'Courier New', Courier, Monaco, monospace; MARGIN-BOTTOM: 10px; COLOR: rgb(46,46,46); FONT-SIZE: 11px; BORDER-TOP: rgb(247,147,30) 2px solid; BORDER-RIGHT: rgb(247,147,30) 0px solid; PADDING-TOP: 10px; 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" class=programlisting>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 style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><PRE style="BORDER-BOTTOM: rgb(247,147,30) 2px solid; BORDER-LEFT: rgb(247,147,30) 0px solid; PADDING-BOTTOM: 10px; LINE-HEIGHT: 16px; OVERFLOW-X: auto; OVERFLOW-Y: auto; MARGIN-TOP: 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; FONT-FAMILY: 'Courier New', Courier, Monaco, monospace; MARGIN-BOTTOM: 10px; COLOR: rgb(46,46,46); FONT-SIZE: 11px; BORDER-TOP: rgb(247,147,30) 2px solid; BORDER-RIGHT: rgb(247,147,30) 0px solid; PADDING-TOP: 10px; 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" class=programlisting>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 style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><SPAN 
    style="FONT-SIZE: 12pt"></SPAN><BR> </DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881> <A 
    href="http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraExpr2.html" 
    rel=nofollow 
    target=_blank>http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraExpr2.html</A><BR><BR></DIV>
    <DIV style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881>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 style="FONT-SIZE: 12pt" class=yui_3_2_0_22_132725134565881><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 style="FONT-SIZE: 12pt" 
    class=yui_3_2_0_22_132725134565881><BR> Thanks<BR><BR> With Best 
    Regards,<BR> Deepak<BR><BR></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>