The console scripting code:
jgrass {
$map = r.read --igrass-in bacino_brenta_pit --ograss-out *
}
rasterData = map.getJGrassRasterData();
rows = rasterData.getRows();
cols = rasterData.getCols();
println rows + " " + cols;
rows--;
cols--;
for (i in 0..rows) {
for (j in 0..cols){
print rasterData.getValueAt(i, j) + " ";
}
println "";
}
Please note that groovy really doesn't need type declaration.
Well on the raster data you could do some nice calculus:
No comments:
Post a Comment