Opened 13 years ago

Closed 10 years ago

#1365 closed defect (fixed)

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:
CPU: x86-64 Platform: Linux


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 -o in="${txt}" out="${txt}" ; done"

I experienced this problem on grass 6.4.2svn and grass7.

Change History (3)

comment:1 by hamish, 13 years ago

for txt in *.txt; do -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}" .


comment:2 by annakrat, 10 years ago

AFAIK, this works. Reopen if needed.

comment:3 by annakrat, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.