You can use the map algebra function combined with Common Table expressions.
On Tue, May 9, 2017 at 4:20 AM, David Westcott < david.westc...@uk.rsagroup.com> wrote: > Dear Post GIS Users > > > > Is there a way in PostGIS of applying a formula to more than two Raster > layers? > > > > For example, I want to derive a new Raster Layer calculated as follows: > > > > Constant1 x Layer1 x (Layer2 ^ Constant2) + Constant3 x Layer3 x (Layer4 ^ > Constant4) + Constant5 x Layer5 x (Layer6 ^ Constant6) > > > > Where Constant1, Constant2, Constant3, Constant4, Constant5 & Constant6 > are fixed constants. > > Layer1, Layer2, Layer3, Layer4, Layer5 & Layer6 are > already derived Raster Layers. > > The ‘^’ sign represents raised to the power of. (i.e. 3^2 > = 9). > > > > How would I apply such a formula in PostGIS? > > > > Kind Regards > > > > David Westcott > > > > Please consider the environment before printing this email. RSA are proud > to be a responsible business - www.rsagroup.com/corporate-responsibility > > ************************************************************ > ************************************************************ > ********************************************************* > Royal & Sun Alliance Insurance plc (No. 93792). Registered in England & > Wales at St. Mark's Court, Chart Way, Horsham, West Sussex, RH12 1XL. > > Authorised by the Prudential Regulation Authority and regulated by the > Financial Conduct Authority and the Prudential Regulation Authority. > For your protection, telephone calls may be recorded and monitored. > The information in this e-mail is confidential and may be read, copied or > used only by the intended recipients. If you have received it in error > please contact the > sender immediately by returning the e-mail. Please delete the e-mail and > do not disclose any of its contents to anyone. > No responsibility is accepted for loss or damage arising from viruses or > changes made to this message after it was sent. > ************************************************************ > ************************************************************ > ********************************************************* > > _______________________________________________ > postgis-users mailing list > postgis-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users