I had to get used to GRASS the last two days because I can't set up my python IDE to work with my osgeo4w python and I find it incredibly clunky. I have a simple ascii raster - I think its origin is ESRI ArcGIS given the following header structure:
ncols 389
nrows 265
xllcorner 665140
yllcorner 4823160
cellsize 20
NODATA_value -9999
All I want to do is a simple import with the GRASS python editor to perform simple raster analyes. None of the 'Import raster data' menu entries worked out (probably because I can't flag the input type?), nor with the python editor. I tried to use r.in.gdal:
import grass.script as grass
grass.run_command("r.in.gdal",
input="AAIGrid_raster.asc",
output="GRASS_raster.asc",
flags="f")
But I don't know how to specify the import format (most likely AAIGrid), as the description here doesn't help me sufficiently (btw. I think there are errors too on that page). In case I'd use -f AAIGrid in the shell, how does that look in pythonian?