Opened 12 years ago

Closed 7 years ago

#240 closed enhancement (fixed)

import all files within a directory

Reported by: timmie Owned by: rashadkm
Priority: major Milestone: 7.0.0
Component: Default Version: unspecified
Keywords: Cc:
CPU: All Platform: All

Description

This was discussed for shapefile vectors at: http://news.gmane.org/gmane.comp.gis.grass.user

  • I cannot just point the program to a directory of shapefiles and tell it import all. QGIS, gvSIG and ArcGIS can do this.

We could easily add v.in.ogr.all or v.external.all, I suppose two or three lines of shell script :) Could be stored in the Addons wiki.

This chould be enabled for vector and raster files. Examples:

  • Import all landcover vector files from a folder
  • Import all SRTM ASC/TIFF files from a folder

a nice option would be if one could run ogr2ogr/v.patch or gdal_merge/r.patch while importing to generate a mosaik of all the tiles within the folder with the same step.

This should also be implemented for the GUI.

Change History (4)

comment:1 Changed 12 years ago by neteler

CPU: UnspecifiedAll
Milestone: 6.4.07.0.0
Platform: UnspecifiedAll
Type: defectenhancement

An option may be to implement wildcard support in r.in.gdal|v.in.ogr. Possibly a GDAL/OGR function could be called to merge before handing the data block over to GRASS (within the modules).

Markus

comment:2 in reply to:  1 Changed 12 years ago by glynn

Replying to neteler:

An option may be to implement wildcard support in r.in.gdal|v.in.ogr.

It doesn't make any sense to implement this within the module.

If you are going to run the entire top-level of a module in a loop, you're better off just running the module itself in a loop.

comment:3 Changed 7 years ago by rashadkm

Owner: changed from grass-dev@… to rashadkm
Status: newassigned

Its not that hard. Adding a small python script could close this enhancement

comment:4 Changed 7 years ago by martinl

Resolution: fixed
Status: assignedclosed

Possible from the GUI [1]. For advanced user easy to write a script for that or to use Graphical Modeler. Closing this ticket.

(1) http://grasswiki.osgeo.org/wiki/File:WxGUI_vector_bulk_import2.png

Note: See TracTickets for help on using tickets.