This is a script which looks for .tab
files in a folder an should imports them with
ogr2ogr
, but I fail with the correct bracing.
for i in $( ls *.tab )
do
echo item: $i
ogr2ogr -f PostgreSQL -s_srs EPSG:21781 -t_srs EPSG:4326 -overwrite \
-nln $TBL_NAME PG:'"host=localhost user='$DBUSER' dbname='$DBNAME'"' $i
done
And I need a command line to execute the ogr2ogr
section in this way:
ogr2ogr -f "PostgreSQL" -s_srs "EPSG:21781" -t_srs "EPSG:4326" -overwrite \
-nln "geom_tour" PG:"host=localhost user=postgres dbname=gis" DMC_34093.tab
host=localhost
part in your code. Also why don't you just dofor i in *.tab
? And what is that code assigning to variablej
for? – daniel kullmann Sep 4 '12 at 8:30