<div dir="auto">Thanks Regina!<br clear="all"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 30, 2024 at 2:28 PM Regina Obe <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div class="m_-6873982630789662613WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt">For basic boolean logic, I would highly suggest just using Reclass, as it’s much faster <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://postgis.net/docs/RT_ST_Reclass.html" target="_blank">https://postgis.net/docs/RT_ST_Reclass.html</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">Generally speaking I think any algebraic operations and I recall even CASE statements allowed in SQL are allowed though I haven’t fully tested that.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">If you are doing more complex things than that, you probably should just create a mapalgebra callback function to use.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">There are some already part of PostGIS proper that are mostly written in plpgsql so you can peak and see how they work<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://postgis.net/docs/RT_reference.html#Raster_Processing_MapAlgebra_Callbacks" target="_blank">https://postgis.net/docs/RT_reference.html#Raster_Processing_MapAlgebra_Callbacks</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt">and then stuff into - <a href="https://postgis.net/docs/RT_ST_MapAlgebra.html" target="_blank">https://postgis.net/docs/RT_ST_MapAlgebra.html</a><u></u><u></u></span></p></div></div><div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div class="m_-6873982630789662613WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt"> <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Robert Burgholzer <<a href="mailto:rburghol@vt.edu" target="_blank">rburghol@vt.edu</a>> <br><b>Sent:</b> Tuesday, July 30, 2024 2:09 PM<br><b>To:</b> PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>><br><b>Subject:</b> Detailed st_mapalgebra reference?<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">We are doing a ton of precip raster analysis and rectification, and we are struggling to find details on the algebraic expressions that we can use, ie, "[rast1] + [rast2]" is great if we are adding, but we are also interested in boolean calculations etc. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">The basic postgis reference page is great for understanding syntax but I am looking for recipes or a large raster calculator reference. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks on advance,<u></u><u></u></p></div><div><p class="MsoNormal">Robert<br clear="all"><br clear="all"><u></u><u></u></p><div><div><div><div><div><p class="MsoNormal">--<br>Robert W. Burgholzer<br> 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.'  - Charles Mingus<u></u><u></u></p></div></div></div></div></div></div></div></div></div></blockquote></div></div>