[GRASS-user] wget (corine) "landcover_tiles_v2" for greece works, but not for europe(?) [SOLVED]

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Mon Jan 12 20:25:28 EST 2009


On Tue, 2009-01-13 at 00:23 +0100, Nikos Alexandris wrote:
> On Mon, 2009-01-12 at 16:19 +0100, Nikos Alexandris wrote:
[...]
> The attribute table of Grid_ETRS89_LAEA5210_100K holds lots
> of "empty cells" since it covers a huge rectangular (a total of more
> than 8000 boxes if I remember well).

> I downloaded each country's 100k-eea-reference-grid shapefile, imported
> all in grass and exported a "european non-empty" list (file attached -
> around 1300 boxes). I re-run the wget-for loop and everything works
> fine :-)

> > [3] http://dataservice.eea.europa.eu/download.asp?id=16267&filetype=.zip


Something is wrong... While my list has no double entries (I
cross-checked with "sort -u" the output of "db.tables -p"), wget
downloaded 262 tiles two times, another 56 tiles three times and another
8 tiles four times!!

Why is that? Connection problems? Most of the double files have the same
size.

Here how I go about it (for all available reference-grid shapefiles):
# check per-country 100k reference-grid-cells
db.tables -p | grep -v grid

AL_100k
AT_100k
BA_100k
BE_100k
BG_100k
CH_100k
CY_100k
CZ_100k
DE_100k
DK_100k
EE_100k
ES_100k
FI_100k
FR_100k
GR_100k
HR_100k
HU_100k
IE_100k
IS_100k
IT_100k
LT_100k
LV_100k
ME_100k
MK_100k
NL_100k
NO_100k
PL_100k
PT_100k
RO_100k
RS_100k
SE_100k
SI_100k
SK_100k
TR_100k
UK_100k

# count tiles from attribute tables
for x in `db.tables -p | grep -v grid`; do db.select -c $x | cut -d"|"
-f2; done | wc -l

1362


# cross-check for double entries
## but, is this possible in a "clean" geo-attribute table after all?
for x in `db.tables -p | grep -v grid`; do db.select -c $x | cut -d"|"
-f2 | sort -u; done | wc -l

1362


# create a tiles-list
for x in `db.tables -p | grep -v grid`; do db.select -c $x | cut -d"|"
-f2; done > corine_v2_tiles_list_europe

# get tiles
for x in `cat corine_v2_tiles_list_europe`; do wget
http://dataservice.eea.europa.eu/staticfiles/landcover_tiles_v2/$x.zip
-a wget_corine_v2_tiles_europe.log && echo "Tile $x downloaded"; done
## unfortunately I used the log in the wrong way initially: instead of
"-a" I used "-o" which overwrites for each loop an existing log :-(

# check results
# total number of downloaded tiles agrees with the above mentioned count
# but... there a lot of double- and triple-downloaded tiles.

Any clue what's messing up this attempt?



More information about the grass-user mailing list