[GRASSLIST:1842] Russia query/DCW script
Michael Ash
mash at econs.umass.edu
Thu Nov 20 10:22:50 EST 2003
Someone recently posted a query about how to import and
combine vmap0/dcw data on Russia. I downloaded each of the
countries of Africa from http://www.maproom.psu.edu/dcw/
(but this should the same as the files at www.GISdepot.com)
and used the shell script below to import, combine, and
assign the right labels to data for each country into a
single Africa location.
BTW, I wrote the shell script to work with GRASS 5.0, and it
will need revision to work with the more recent revisions
(new directory structure).
-Michael
Date: Sun, 15 Jun 2003 23:55:26 -0400 (EDT)
From: Michael Ash <mash at econs.umass.edu>
To: grasslist at baylor.edu
Subject: [GRASSLIST:396] Re: vmap (DCW)
I download Digital Chart of the World (VMAP0) data on a
country-by-country basis in .e00 (ESRI export) format from
http://www.maproom.psu.edu/dcw/
I believe that the data in .e00 format are an ESRI product
made available for free in a slightly inconvenient format.
I then use the attached script to import and organize the
data, e.g., to assign the correct dig_cats files, etc. Let
me know if I can help with the script.
Best,
Michael
g.gisenv set=MAPSET=ndiku
for i in /home/ndiku/dcw/[a-z]*
do
echo $i
country=${i#'/home/ndiku/dcw/'}
echo $country
for j in $i/*.e00
do
m.in.e00 -is input=$j
coverage=${j#/home/ndiku/dcw/$country/}
coverage=${coverage%.e00}
echo $j
echo $country $coverage
g.rename -o vect=$coverage,${country}_$coverage
g.rename -o sites=$coverage,${country}_$coverage
if [ -e /home/ndiku/grass/SSA/ndiku/dig_cats/${coverage} ]
then
for k in /home/ndiku/grass/SSA/ndiku/dig_cats/${coverage}*
do
label=${k#/home/ndiku/grass/SSA/ndiku/dig_cats/$coverage}
echo $k
echo $label
mv $k /home/ndiku/grass/SSA/ndiku/dig_cats/${country}_$coverage$label
done
fi
done
if [ -e /home/ndiku/grass/SSA/ndiku/site_lists/${country}_aepoint ]
then
s.to.vect -p input=${country}_aepoint output=${country}_aepoint
cp /home/ndiku/grass/SSA/ndiku/dig/${country}_aepoint /home/ndiku/grass/SSA/ndiku/dig/${country}_aepoint.aeptname
cp /home/ndiku/grass/SSA/ndiku/dig_att/${country}_aepoint /home/ndiku/grass/SSA/ndiku/dig_att/${country}_aepoint.aeptname
cp /home/ndiku/grass/SSA/ndiku/dig_plus/${country}_aepoint /home/ndiku/grass/SSA/ndiku/dig_plus/${country}_aepoint.aeptname
fi
if [ -e /home/ndiku/grass/SSA/ndiku/site_lists/${country}_pppoint ]
then
s.to.vect -p input=${country}_pppoint output=${country}_pppoint
cp /home/ndiku/grass/SSA/ndiku/dig/${country}_pppoint /home/ndiku/grass/SSA/ndiku/dig/${country}_pppoint.ppptname
cp /home/ndiku/grass/SSA/ndiku/dig_att/${country}_pppoint /home/ndiku/grass/SSA/ndiku/dig_att/${country}_pppoint.ppptname
cp /home/ndiku/grass/SSA/ndiku/dig_plus/${country}_pppoint /home/ndiku/grass/SSA/ndiku/dig_plus/${country}_pppoint.ppptname
fi
done
More information about the grass-user
mailing list