<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Regarding filename matching etc. I would just wrap everything in a scripting language of your choice (bash, python, ruby etc.) considering all the GMT programs, including grdmath, are command line tools.</div><div><br></div><div>-ra</div><br><div><div>On 23 Nov 2015, at 16:27, Rasmus Aveskogh <<a href="mailto:rasmus@defero.se">rasmus@defero.se</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>Though this is probably possible in PostGIS nowadays I would personally solve such a use case with GMT (<a href="http://gmt.soest.hawaii.edu/">http://gmt.soest.hawaii.edu/</a>), for example with grdmath (<a href="http://gmt.soest.hawaii.edu/doc/5.2.1/grdmath.html">http://gmt.soest.hawaii.edu/doc/5.2.1/grdmath.html</a>) which lets you perform rather complex computations on multiple grids (for examples rasters) using reverse polish notation.</div><div><br></div><div>-ra</div><br><div><div>On 23 Nov 2015, at 13:20, Darrel Maddy <<a href="mailto:darrel.maddy@newcastle.ac.uk">darrel.maddy@newcastle.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-GB" link="#0563C1" vlink="#954F72" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Dear all,<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">As you know I am relatively new to postgis and SQL and therefore I have much to learn. However, I am facing a paper deadline and need to do some quick analysis of the data I have and I am struggling to figure out how best to pursue what I need to do.<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">I have a significant number of rasters which have double precision values. Without going into detail about what the rasters represent, I need to extract and sum values from one set of rasters in say table A based upon values in another set of rasters in say table B where the pixel value in the raster from Table B exceeds a threshold. Both tables are the same size (rasters are tiled) but I also need to figure out how I make sure the correct rasters are compared. They have filenames like this rastervariable_10.tif, rastervariable_100.tif , presumably I need to use a logical expression to strip the numerical value (in this case this represents the year) and then order on that basis?<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">I can do this in QGIS one at a time but that is a little clumsy and rather time consuming.<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">If someone can just point me in the right direction I am sure I can figure out the rest for myself.<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Apologies once more for asking what is probably a rather trivial question and yet again demonstrating my ignorance.<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Many thanks<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Darrel<o:p></o:p></div></div>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" style="color: rgb(149, 79, 114); text-decoration: underline;">postgis-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" style="color: rgb(149, 79, 114); text-decoration: underline;">http://lists.osgeo.org/mailman/listinfo/postgis-users</a></div></blockquote></div><br></div></blockquote></div><br></body></html>