[GRASS-dev] [GRASS GIS] #1365: Import raster files - Batch import

#1365: Import raster files - Batch import
------------------------------------------------+---------------------------
Reporter: lluis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: import, batch, raster files, wxGUI | Platform: Linux
      Cpu: x86-64 |
------------------------------------------------+---------------------------
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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1365&gt;
GRASS GIS <http://grass.osgeo.org>

#1365: Import raster files - Batch import
------------------------------------------------+---------------------------
Reporter: lluis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: import, batch, raster files, wxGUI | Platform: Linux
      Cpu: x86-64 |
------------------------------------------------+---------------------------

Comment(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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1365#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1365: Import raster files - Batch import
------------------------------------------------+---------------------------
Reporter: lluis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: import, batch, raster files, wxGUI | Platform: Linux
      Cpu: x86-64 |
------------------------------------------------+---------------------------

Comment(by annakrat):

AFAIK, this works. Reopen if needed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1365#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1365: Import raster files - Batch import
---------------------+------------------------------------------------------
  Reporter: lluis | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Resolution: fixed | Keywords: import, batch, raster files, wxGUI
  Platform: Linux | Cpu: x86-64
---------------------+------------------------------------------------------
Changes (by annakrat):

  * status: new => closed
  * resolution: => fixed

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1365#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>