[GRASS-user] r.out.gdal Python code

Nikos Alexandris nik at nikosalexandris.net
Thu Nov 6 10:41:41 PST 2014


Adam Hoffritz wrote:

>> Hello all,
>> I'm having a problem with my r.out.gdal python code. This is the 
>> code (run
>> from python shell in Grass7)

>> grass.run_command('r.outgdal', input=items,
>> output='G:/Lokaverkefni/blettagreining/tifs/items[:-10]

Nikos Alexandris wrote:

> I have no idea about working under windows and how to define paths.
> But, the "." is missing from your r.out.gdal command above (in case
> you copy-pasted).

As well, the r.out.gdal command accepts a single input or group which 
it will export. Given you need to export many "items", as the part 
"input=items" in your command above implies, the way to do it, should 
likely be to loop over a list of items.

You might want to post a bigger part of your code.

Nikos


More information about the grass-user mailing list