Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Map Algebra statement to interpolate between two rasters

$
0
0
I am having some trouble converting a script I wrote for 9.3 to 10.0 using Map Algebra. It is a linear interpolation between two rasters on a log-linear scale.

Here is the 9.3 code:

Code:

gp.SingleOutputMapAlgebra_sa("POW(10 , LOG10(4) - %s * (LOG10(4) - LOG10(10)) / (%s - %s))" %(D25, D25, D10), X25, "'';''")
and here is what I have for 10, which does not work:

Code:

X25 = Power(((Log10(4)) - Raster("D25") * (Log10(4) - Log10(10)) / (Raster("D25") - Raster("D10")),10)
X25.save(ws + "\X25")

Does anyone have any suggestions on what I may be doing wrong?

Viewing all articles
Browse latest Browse all 2485

Trending Articles