Ticket #1365 (new defect)

Opened 12 months ago

Last modified 12 months ago

Import raster files - Batch import

Reported by: lluis Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: wxGUI Version: unspecified
Keywords: import, batch, raster files, wxGUI Cc:
Platform: Linux CPU: x86-64

Description

I have several Arc/Info? ASCII Grid files (up to 100) but when I try to import it into GRASS I can't get any result.

If I select Directory as a Source Type, and I write the path to the folder that contains the raster layers (selecting Arc/Info? ASCII Grid as Format), no layers appear on List of GDAL Layers. Is like if GRASS doesn't recognize the layers. It doesn't matter if the extension of the raster layers is *.txt or *.asc

On the other hand, I can import the files one by one (selecting File as a Source Type) but I can't do it as batch. Any hint? If I do it from the terminal it works fine, so I suppose that it is a problem with the wxGUI:

"for txt in *.txt; do r.in.gdal -o in="${txt}" out="${txt}" ; done"

I experienced this problem on grass 6.4.2svn and grass7.

Change History

Changed 12 months ago by hamish

for txt in *.txt; do r.in.gdal -o in="${txt}" out="${txt}" ; done

no idea about the wxgui bug, but fwiw in the scripting, ${} does nothing, just use "$txt", and you can strip off the .txt from the output name with either out=`basename "$txt" .txt` , or back with the curly brackets: out="${txt%.txt}" .

Hamish

Note: See TracTickets for help on using tickets.