[GRASSLIST:9153] Re: import shapefile with v.in.ogr and a script , qgis

Stephan Holl holl at gdf-hannover.de
Sun Nov 20 06:35:43 EST 2005


Hello Helmut, 

On Sun, 20 Nov 2005 11:52:56 +0100 Helmut Kudrnovsky <hellik at web.de>
wrote:

> hi grass-friends,
> 
> i have a lot of shape-files, which i want to import with v.in.ogr in
> an existing location/mapset. location/mapset and shape-files have all
> the same projection.
> 
> i´m not very familiar in scripting in grass/linux, but maybe a
> "scripty" way of import would be the best way for import. are there
> some internet-sources about examples of such scripts? where have i to
> store the scripts?


just write a short shell-script for batch-import

untested:
---script begins---
#/bin/bash

for i in `ls *.shp`
do
  echo "importing shape $i..."
  v.in.ogr dsn=$i out=`echo $i|cut -d"." -f1`

done
---script end---

This will most probably not work if filenames do have spaces, but right
now I do not have a solution for that.

Probably someone can provide a more sophisticated method of
batch-importing.


> a second question, maybe in the wrong list:
> 
> i´ve downloaded yesterday the latest rpm´s of grass and qgis for suse
> from the gdf-homepage. they are compiled for suse 9.3, but my
> linux-machine is running on suse 9.2.
> 
> the install of the most programs is o.k., but, if i want to install
> qgis, there is the error message, that the right squlite-version is
> missing. have i to update/upgrade my sqlite-version (version of the
> original suse 9.2-dvd) to the next version?

Please have a look at the SuSE-Readme:

sqlite3 packages for several SuSE distributions <= 9.2 can be obtained
from
http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Libraries/sqlite/.
For SuSE 9.3 sqlite-3.1.3-3 is included.

This should work then.

> 
> with greetings from tyrol an thanks in advance

Best
	Stephan

-- 
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office      -     Mengendamm 16d      -     D-30177 Hannover
Internet: www.gdf-hannover.de      -      Email: holl at gdf-hannover.de
Phone : ++49-(0)511.39088507       -        Fax: ++49-(0)511.39088508




More information about the grass-user mailing list