<div>zootribe,</div><div><br></div><div>I've got a question about some raster processing using python.</div><div>The code below works when I run it standalone, but not if I run it as a zoo-service.</div><div>Does anybody have a clue why not?</div>
<div><==========></div><div><div>driver=gdal.GetDriverByName('GTiff')</div><div>driver.Register()</div></div><div>ds=gdal.Open(filename, GA_ReadOnly)</div><div><br></div><div>cols=ds.RasterXSize</div><div>rows=ds.RasterYSize</div>
<div>rain_factor=0.85</div><div><br></div><div>r2arr=ds.GetRasterBand(1).ReadAsArray(0,0,cols, rows).astype(float)</div><div>r2rainfactor=dot(rain_factor,r2arr)</div><div>outputs["Result"]["value"]=str(r2rainfactor[100,100])</div>
<div><=========></div><div><div>TRACE : 'NotImplementedType' object is unsubscriptable</div><div>TRACE : <type 'exceptions.TypeError'></div><div>Unable to run your python process properly</div>
</div><div><br></div><div>So I'm trying to do a numpy scalar*array multiplication with the dot operator, this seems to be working standalone, but not in CGI?</div><div><br></div><div>Cheers, Niels</div>