You are on page 1of 89

CORINE GRASS-GIS

2 , 2009

CORINE
GRASS-GIS

2 , 2009

-: nikos.alexandris@felis.uni-freiburg.de

http://creativecommons.org/licenses/by-sa/3.0/gr/deed.el

GRASS-user gdal-dev,
. Markus Neteler wget .

CORINE.

...
.

.

...
2 0.1 .
OpenOffice.org LYX0.2 ,
,
.

CORINE ( ). 2 ,
,
GRASS-user : ,
, ,
, .


/ CORINE0.3 ,
CORINE ( II) ( III) .

.
/
, .. ,
GIS .
(0.4 ),
,
,
GRASS ,
.

0.1
0.2
0.3
0.4

http://tilaphos.googlepages.com/CORINE_withGRASS_gr.pdf
http://www.lyx.org
CORINE CORINE2000
GIS

CORINE GRASS-GIS

15

1 / CORINE

17

2 GRASS
2.1 GRASS . . . .
2.2 . . . . . . . . . . . . . . . .
2.3 GRASS . . . . . . . . .
2.4 . . . . . . . . . . . . . . . . .
2.5 SQLite .
2.6
2.7 GRASS . . . . .

19
19
20
21
21
22
23
23

II

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

CORINE

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

25

29

4 CORINE

39

5 ETRS89

41

6 CORINE

43

45

49

9 CORINE
53
9.1 . . . . . . . . . . . . . . . . . . . . . . . . . 53
9.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
10 CORINE

57

III

59

CORINE

11 CORINE

63

12

67

13

71

14 CORINE

75

A CORINE

79

B CORINE csv

83

87


1.1 / CORINE 2000 . . . . . . . . . 18
2.1 GRASS

. . . . . . . . . . . 21

3.1 . . . . . . . . . . .
3.2 EPSG . . . . . . . .
3.3 Mapgen () . . . . . . . . . . . . . . .
3.4 Mapgen () . . . . . . . . . . . . . .
3.5
3.6 . . . . . . . . .
3.7 . . . . . . . . . . . . . . . . . .
3.8 v.type.sh . . . . . . .
3.9 v.digit . . . . . . .
3.10 v.digit . . . . . . . . . . . . . . .
3.11 . . . . . . . . . . . . . .
3.12 . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

30
30
31
32
33
34
34
35
35
36
36
37

4.1 CORINE . . . . . . . . . . . . 40
7.1 O . . . . . . . . . . . . . . . . . . . 46
7.2 SQLite Database Browser . . . . . . . . . . . . . . . . . . 47
8.1 . . . . . . . . . . . 49
9.1 CORINE . . . . . . . . . . . . . . . . . . 56
11.1 100 . . . . . . . . . 64
13.1 CORINE . . . . . . . . . . . . . . . . . . . . . . . . 72
14.1 CORINE ETRS-LAEA . 75
14.2 GRASS: CORINE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
14.3 CORINE SRTM3 . . . 77

10


CORINE
GRASS Ubuntu-Linux0.5, 0.6 .
CORINE /
.
CORINE 1 17.

GRASS () .
.
.
:
I

1 CORINE
.

2
GRASS.
II

3 ,
.

4 10 CORINE GRASS (
).
0.5

0.6

, ,
Ubunut-Linux.
Ubuntu
Ubuntu. GRASS-GIS
Linux .

http://ubuntu-gr.org

III

11 14 - .

(A) 3
CORINE ( ) (B)
( )

GRASS .

12


user-id


>, ..: > g.proj p

..: Trying to open with OGR...
[...]



.

III CORINE :

#
CORINE ( III) !
CORINE ( 100
x 100 , )


GRASS,
.




CORINE GRASS-GIS

15

1 /
CORINE
(E1.1 )
1.2 / CORINE1.3, 1.4 .
.

. CORINE (
):
EEA grants free access to all its data/applications provided that the user agrees:

to acknowledge the source as follows: Copyright EEA, Copenhagen, 2007


to display a link to the EEA web site http://www.eea.europa.eu
not to use the data/ applications for commercial purposes unless the Agency has expressly
granted the right to do so

(vector) (raster)1.5 .
CORINE
1.6 . O
ESRI Shapefile(s)1.7 . O

2009.
:
1.1

http://www.eea.europa.eu
http://dataservice.eea.europa.eu/dataservice/termsofuse.asp
1.3
http://reports.eea.europa.eu/COR0-landcover/en
1.2

1.4

E (, 2004): http:

1.5

100 250

//www.eea.europa.eu/pressroom/newsreleases/CLC2000-el
(100 ) http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=

1007
(250 ) http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=

1008
1.6

1.7

http://dataservice.eea.europa.eu/dataservice/datauser.asp
http://www.eea.europa.eu/themes/landuse/clc-download?configfile=config_
clcdownload.xml

1 / CORINE

1.1: / CORINE 2000


1. (MMU1.8 ) 25 .
(.. , ) (..
) 25 , .

2. , Land Cover Clas-

sification System1.9 (FAO),


/ CORINE .
CORINE .

CORINE .

.
/ .
.
1.10, 1.11 .
1.8

Minimum Mapping Unit


Land Cover Classification System, version 2, by Antonio di Gregorio Classification concepts and user manual, page 8
1.10
http://dataservice.eea.europa.eu/download.asp?id=16337&filetype=.zip
1.11
http://www.epa.ie/downloads/data/corinedata/epa_corine_technical_guide_
update_2000.pdf
1.9

18

2
GRASS
GRASS-GIS2.1, 2.2 () .
GRASS ( ) 2.3 .
GRASS Ubuntu
GRASS2.4 .
2.5, 2.6 .
GRASS ,
, 2.7 .
.
GRASS
2.8, 2.9 . SQLite
2.10 .

2.1 GRASS
GRASS. , ,

GRASS.
2.1

http://grass.osgeo.org
http://grass.osgeo.org/intro/firsttime.php
2.3
http://grass.osgeo.org/download/index.php
2.4
http://www.les-ejk.cz/ubuntu Jachym Cepicky
2.5
http://grass.osgeo.org/gdp/index.php
2.6
http://wiki.osgeo.org/wiki/Educational_Content_Inventory
2.7
http://grass.osgeo.org/gdp/manuals.php
2.8
http://grass.osgeo.org/grass64/manuals/html64_user/databaseintro.html
2.9
http://grass.osgeo.org/grass64/manuals/html64_user/sql.html
2.10
http://grass.osgeo.org/grass64/manuals/html64_user/grass-sqlite.html
2.2

2 GRASS
GRASS
GRASS. O GRASS:
1. ( ,
),
/ (-) 2.11 .
2. (attribute tables)
.
1
GRASS2.12 .
2.5.

2.2
GRASS
/.
GRASS (, )
( , , ..)
. GRASS
(
2.13 .
(project)
.

peloponnisos thessalia.
.

.
2.11
2.12

GRASS: GRASS-GIS Database, GRASS Database, GRASSDB


GRASS 80 , : ...,

, USA-CERL.
:

http://grass.osgeo.org/devel/grasshist.html
2.13

/home/user-id/grassdb 4

20

2.3 GRASS

2.1: GRASS

2.3 GRASS
,
(LOCATION)2.14
. ( GRASS)
.
.

wgs84 laea (
g.proj ).
v.proj
r.proj ( ).

2.4
,
2.14

http://grass.osgeo.org/intro/firsttime.php#location

GRASS

):

21

2 GRASS
, ( , 3- ) . (
)
.
, (PERMANENT Mapset)
. .
(user mapset)
g.copy.

GRASS
.
GRASS
GRASS .
2.15
, . ,

GDAL2.16, 2.17 OGR2.18, 2.19 .

2.5 SQLite
GRASS
DBF, SQLite 2.20, 2.21 ,
2.22 SQL /.
(
) .
GRASS-GIS
2.15

r.out.* v.out.* 2.7 .

2.16

http://www.gdal.org
http://www.gdal.org/formats_list.html
2.18
http://www.gdal.org/ogr/index.html
2.19
http://www.gdal.org/ogr/ogr_formats.html
2.20
http://www.sqlite.org
2.17

2.21

SQLite Ubuntu.
Ubuntu.
2.22
: Data Base Management System (DBMS)

22

2.6

SQLite2.23 .
sqlitebrowser 2.24, 2.25
SQLite.
GRASS
.

2.6
(computational region). ( )
.
g.region
GRASS. (GIS-Manager)2.26 (Map Display).

GRASS
( ).
,
( / resolution) .

2.27 .

2.7 GRASS
GRASS 2.28 .
400.
2.23
2.24
2.25

2.26
2.27

2.28

: http://www.sqlite.org/faq.html

http://sourceforge.net/projects/sqlitebrowser
Ubuntu ( Ubuntu-Linux 8.04, 8.10) sqlitebrowser

http://grass.osgeo.org/grass63/manuals/html63_user/gis.m.html
,
, , GRASS.
g.region.

http://grass.osgeo.org/grass63/manuals/html63_user/full_index.html

23

. ,
, , /
.
: v.patch
( vector).
g.region
(generic).
r. ( raster) d. ( display)
/ . db. ( database)
( )
i. ( imagery)
( ).

II

CORINE

25

...
1

NOAA
coastline extractor

(LOCATION) GRASS datum WGS84



2

-

3

CORINE
(LOCATION) ETRS892.29
CORINE
4


/

5

CORINE
CORINE

2.29

European Terrestrial Reference System 89

3

Coastline Extractor 3.1
NOAA3.2
.
3.3
. : () East=23.6, () North=38.5, ()
West=21, () South=36 ( (3.1)).
Coastline Extractor Geographic Range of Coastline to
Extract 3.4 . Mapgen
Coast Format options SUBMIT Extract
the Coastline File ( Enter
). ,
dat (.. 8145.dat)
.
, /home/userid/grassdb/clc2000
.
GRASS
:

$ grass -gui
GRASS EPSG Codes.
EPSG ( 3.2)
datum WGS843.5 (
) EPSG 43263.6 .
3.1
3.2
3.3
3.4

3.5
3.6

http://rimmer.ngdc.noaa.gov/mgg/coast/getcoast.html
http://www.noaa.gov

mapgen (
WGS84 GRASS v.in.mapgen.

http://en.wikipedia.org/wiki/WGS84
http://spatialreference.org/ref/epsg/4326

3.1:

3.2: EPSG

(.. wgs84) 4326


Define location. (PERMANENT Mapset)
.
Enter GRASS. :
3.7 ( 3.3 3.5),
Output window3.8
( 3.7).
3.7
3.8

http://grass.osgeo.org/grass63/manuals/html63_user/gis.m.html
GRASS,
. :

http://grass.osgeo.org/wiki/WxPython-based_GUI_for_GRASS

30


Help > GRASS Help.
v.in.mapgen, : vector commands
v.in.mapgen.

3.3: Mapgen ()

( 3.3): File > Import Vector map > Matlab and Mapgen >
( 3.4) dat,
Run .
, :
1. (
3.5)

31

3.4: Mapgen ()
2.
( 3.5)
3. coastlines ( 3.6).
4. (
3.7).
5. , ,
Zoom display to selected map.
6.
set the computational region extent to match the display.
,

.
: Vector > Develop > Convert
object types ( v.type.sh,
3.8).
coastlines . v.digit . Vector > Develop > Digitize, coastlines_bndrs ( 3.9) Run.

32

3.5:
33

3.6:

3.7:

34

3.8: v.type.sh

3.9: v.digit

/ GRASS
- .

v.digit.
,

35

3.10: v.digit
(boundaries and centroids)
, .

3.11:



1,2 3 3.10, , .
3.11, : 2 , ()
,


(undo)
. wxGRASS
.
save & exit ( ).
GRASS 3.9
() .
3.9

areas:

http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/
proceedings/pdfs/Blazek_Radim.pdf

36

().
Vector > Develop > Add centroids.
v.centroids 3.10 coastlines_bndrs
3.11
(.. studyarea).

,
studyarea ( 3.12).

3.12:

3.10
3.11

input vector map


output name field

37

4 CORINE
8 .
zip .
(
tiles)
GRASS (
grassdb).
4.1

$ cd /home/user-id
-
- 4.2

$ mkdir -p grassdb/clc2000/tiles
$ sudo chmod ug+rwx -R grassdb
4.3

$ mv /from/your/download/directory/100km*.zip /home/
user-id/grassdb/clc2000/tiles

$ cd /home/user-id/grassdb/clc2000/tiles
$ unzip \*.zip
4.1
4.2

http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/home.html

.
Changing Permissions Ubuntu F1
4.3
/from/your/download/directory/

4 CORINE

4.1: CORINE
- .
GRASS. Shapefiles OGR :
CORINE2000 GRASS-GIS Ubuntu-Linux 8.04 ( 5) blog T ( 2008).

40

5
ETRS89
ogrinfo
CORINE
/ CORINE.
GRASS
shapefiles 20
:

$ ogrinfo 100KME53N16.shp -al | head -20


INFO: Open of 100KME53N16.shp
using driver ESRI Shapefile successful.
Layer name: 100KME53N16
Geometry: Polygon
Feature Count: 1743
Extent: (5321431.203205, 1599999.999553) (5400000.000207, 1699999.999646)
Layer SRS WKT:
PROJCS["ETRS_1989_LAEA",
GEOGCS["GCS_ETRS_1989",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["False_Easting",4321000.0],
PARAMETER["False_Northing",3210000.0],
PARAMETER["Central_Meridian",10.0],
PARAMETER["Latitude_Of_Origin",52.0],
UNIT["Meter",1.0]]

5 ETRS89
(LAEA).
datum ETRS895.1 .
Linux ( ). etrs98 Etrs89.
GRASS wgs84.
g.proj , g.proj help g.proj corine.
, g.proj ( 2
GRASS corine).

CORINE
GRASS

> g.proj -c georef=/home/user-id/grassdb/clc2000/


tiles/100KME53N16.shp location=laea
Trying to open with OGR...
...succeeded.
Location laea created!
GRASS exit
. X ()
File > Exit
Ctrl+Q .

5.1

ETRS89/ ETRS-LAEA (European Terrestrial Reference System 89,


Lambert Azimuthal Equal Area): http://spatialreference.org/ref/epsg/3035/

42

6 CORINE

GRASS laea
.
(
sqlite ).

> db.connect driver=sqlite database=/home/user-id/


grassdb/clc2000/laea/PERMANENT/sqlite.db
driver:sqlite
database:/home/nik/grassdb/peloponnese/hgrs87/
PERMANENT/sqlite.db
schema:
group:
(-) studyarea wgs84
studyarea.

> v.proj studyarea location=wgs84


> g.region vect=studyarea -p
CORINE .
GRASS 6.1 :

. () .
6.1

http://grass.itc.it/grass62/manuals/html62_user/sql.html

6 CORINE
shapefiles,
, *nix6.2
v.in.ogr . GRASS
shapefiles

> cd /home/user-id/clc2000/tiles
( nano)
import_clc2000_tiles.sh

> nano import_clc2000_tiles.sh


#! /bin/bash
for i in *.shp; do
v.in.ogr -r dsn=$i out=xecho $i | sed s+\.+_+g
done
nano Ctrl+X (

Y Enter).
'

.shp
dsn=.

shapefiles.
out= x echo $i | sed s+\.+_+g.
| echo $i
sed s+\.+_+g
. _.

&
- -

> sudo chmod ug+rx import_clc2000_tiles.sh


> sh import_clc2000_tiles.sh
6.2

http://en.wikipedia.org/wiki/Unix-like

44

7
CORINE v.patch.

.
GRASS .
(.. SHAPE_area, AREA, AREA_HA, ..) v.db.dropcol sqlitebrowser.
sqlitebrowser
sqlite.db

> sqlitebrowser /home/user-id/grassdb/laea/PERMANENT/


sqlite.db
(Database Structure). .
Edit > Modify Table > Table name
, .. x100KME53N16_shp > Edit > AREA
> Remove field > Yes > Close.
() cat CODE_00.
File > Save Database > Exit
( 7.1)
g.mlist (
g.mlist man g.mlist g.manual g.mlist)

> v.patch -e input=g.mlist vect sep=, pattern=x100*


out=corine
[...]
v.patch complete. 8 vector maps patched
corine

7.1: O

> db.tables -p
[...]
CODE_00 (text) (integer).
, , :-)7.1 .
sqlitebrowser Edit > Modify Table >
corine > Edit > CODE_00 > Edit field >
... (custom type) > integer > OK >
Apply Changes > Close > File > Exit
v.info.

> v.info -h corine


COMMAND: v.patch -e input="x100KME53N16_shp,
x100KME53N17_shp,x100KME54N15_shp,x100KME54N16_shp
,x100KME54N17_shp,x100KME55N15_shp,
x100KME55N16_shp,x100KME55N17_shp" output="corine"
7.1

GRASS-user http://lists.osgeo.org/pipermail/

grass-user/2008-January/042726.html

46

7.2: SQLite Database Browser

GISDBASE: /home/nik/grassdb/clc2000
LOCATION: laea MAPSET: PERMANENT USER: nik DATE: Sun
Mar 16 23:44:15 2008

, input= g.mlist vect


sep=, pattern=x100* . M

v.support.
( ,
) .
:

> v.support map=corine map_name="CORINE land cover


2000" comment="command g.mlist vect sep=, pattern=
x100* used for v.patch input, map needs cleaning
and dissolving"


.
:-).

47

8.1:

8
( 7.1)
( - 8.1).

/ .

(
v.dissolve):

> v.clean input=corine output=corine_clean type=point


,line,boundary,centroid,area tool=snap,break,
rmdupl thresh=.01

> v.dissolve input=corine_clean output=


corine_dissolved col=CODE_00

corine_dissolved.
studyarea clc2000_final

> v.overlay ainput=studyarea atype=area binput=


corine_dissolved btype=area output=
corine_studyarea operator=and olayer=1,0,0

> db.describe -c corine_studyarea


[...]
cat, a_b_nam b_cat. sqlitebrowser a_b_nam
name b_cat code.

> db.describe -c corine_studyarea

50

ncols:
nrows:
Column
Column
Column
Column
Column
Column
Column

7
8703
1: cat:INTEGER:20
2: name:TEXT:99999
3: code_00:INTEGER:20
4: code:INTEGER:20
5: rgb:TEXT:255
6: grassrgb:TEXT:255
7: area_ha:DOUBLE PRECISION:20

51

9 CORINE
9.1
- - ()
9.1
/ .
GRASS
.
grassrgb
.
d.vect
.
: ::,
, 0
255 ,
. (:)
, grassrgb
11 varchar.

() , ()
, , GRASS
(, ) ()
grassrgb ( ).

.
(join)
,
, .
SQL9.2 .
9.1
9.2

= , , RGB= red, green, blue)

http://www.sqlite.org/lang.html

9 CORINE

9.2
csv9.3
:
csv OpenOffice.org: > > OpenOffice.org (
)
2 (code rgb)

csv ( /home/user-id/grassdb/clc2000 corine_rgb.csv)

(sqlite.db).
. 9.4

> db.in.ogr clc_rgb.csv out=corine_rgb


code rgb integer varchar(11) .
sqlitebrowser
( 45). code
corine_studyarea code_00

> v.db.join map=corine_studyarea layer=1 column=


code_00 otable=corine_rgb ocolumn=code
:

> db.select corine_studyarea


.
.
grassrgb
9.3

http://dataservice.eea.europa.eu/dataservice/metadetails.
asp?id=950 Ascii delimited
9.4
clc_rgb.csv

54

9.2

> v.db.addcol map=corine_studyarea column="grassrgb


varchar(11)"
::
grassrgb

> echo "UPDATE clc00_StudyArea SET grassrgb =


(substr(rgb,1,3)||:||substr(rgb,5,3)||:||
substr(rgb,9,3))" | db.execute

> db.describe -c corine_studyarea


/

> db.select corine_studyarea


code_00 rgb sqlitebrowser.
corine .
X ( 9.1) :

> d.mon x0
> d.vect corine_studyarea type=area size=0 width=0
rgb_column=grassrgb -a
: Add vector
layer > corine_studyarea > Draw
lines GRASSRGB column colors.

'

ETRS89.
,
.

&

55

9 CORINE

9.1: CORINE

56

10 CORINE

:

> v.db.addcol corine col="area_ha double precision"


> v.to.db map=corine type=boundary,centroid option=


area units=h columns=area_ha
(.. / ) v.report
.
SQL db.select
.

> echo "select code, sum(area_ha) from


corine_studyarea group by code" | db.select
code|sum(area_ha)
111|911.125919
112|18378.199764
121|1954.70496
[...]
334|3930.685132
411|1688.078293
421|1388.759659
422|90.039538
511|1404.862058
512|2386.576137
521|355.55877

10 CORINE

CORINE. ,
1987 (8710.1, 10.2 )
ETRS89
v.proj.

;
GRASS exit .

10.1
10.2

EPSG: 2100
87 GGRS87(=Greek Geodetic Reference System 1987)
HGRS87 (= Hellenic Geodetic Reference System 1987). EGSA87.

58

III

CORINE

59

...
1

GR_100K.shp CORINE10.3 NUTSV910.4


2

GR_100K.shp

CORINE 10.5
3

CORINE NUTSV9

( CORINE),
/
,

CORINE
4

( NUTSV9)
CORINE
5

/
- CORINE

10.3

http://dataservice.eea.europa.eu/download.asp?id=18328&filetype=.zip
http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=760
10.4
http://dataservice.eea.europa.eu/download.asp?id=17888&filetype=.zip
http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1004
10.5

http://dataservice.eea.europa.eu/staticfiles/landcover_tiles_v2/[...],
[...] .

11 CORINE
# CORINE GR_100K.shp11.1, 11.2
# (=) CellCode.

11.3

# grass laea
# grass 11.4

> db.connect driver=sqlite database=/geo/grassdb/


ellas/laea/PERMANENT/sqlite.db
# db.connect -p
# GR_100K.shp grass

> v.in.ogr dsn=/geo/geodata/ellas/vector/eea/


eea_reference_grid_el/GR_100K.shp out=eea_gr_100k
# 10 eea_gr_100k

> db.select eea_gr_100k | head


11.1

11.2

http://dataservice.eea.europa.eu/download.asp?id=
18328&filetype=.zip
http://dataservice.eea.europa.eu/dataservice/metadetails.
asp?id=760

GREEA18328I.zip GR_100K.shp
11.1 Quantum GIS, (
!)
11.4
GRASS (
) -
.

11.3

11 CORINE

11.1: 100 .

cat|CellCode|EofOrigin|NofOrigin
1|100kmE51N18|5100000|1800000
2|100kmE51N19|5100000|1900000
3|100kmE52N16|5200000|1600000
4|100kmE52N17|5200000|1700000
5|100kmE52N18|5200000|1800000
6|100kmE52N19|5200000|1900000
7|100kmE52N20|5200000|2000000
8|100kmE53N15|5300000|1500000
9|100kmE53N16|5300000|1600000
10|100kmE53N17|5300000|1700000
# CellCode 2
# ** cut

> db.select eea_gr_100k -c | cut -d"|" -f2


100kmE51N18
100kmE51N19
100kmE52N16

64

100kmE52N17
100kmE52N18
100kmE52N19
[...]
# 2 ,
,

> db.select eea_gr_100k -c | cut -d"|" -f2 >


corine_v2_tiles_ellas
#

> mkdir pool


> cd pool
# wget for

> for x in cat corine_tiles_ellas; do wget http://


dataservice.eea.europa.eu/staticfiles/
landcover_tiles_v2/$x.zip; done
--2009-01-12 15:12:26-- http://dataservice.eea.
europa.eu/staticfiles/landcover_tiles_v2/100
kmE51N18.zip
Resolving dataservice.eea.europa.eu... 217.74.209.209
[...]
Saving to: 100kmE51N18.zip
100%
[============================>] 408,346
1.12M/s
in 0.3s
2009-01-12 15:12:27 (1.12 MB/s) - 100kmE51N18.zip
saved [408346/408346]
[...]
#
> unzip \ . z i p

65

12
# ()
grass

> for x in *.shp; do v.in.ogr dsn=$x out=tile_


basename $x .shp; done
#

> for x in g.mlist vect pat=tile_* sep=,; do


v.patch -e --o in=$x out=
corine_ellas_tiles_patched; done
# **

> v.clean corine_ellas_tiles_patched out=


corine_ellas_patched_clean tool=snap,break,rmdupl
thresh=.01
#
# 12.1

> v.info -c corine_ellas_patched_clean


12.1

(= -
) . ,
, - SQL
. , , (v.dissolve).
(
CORINE ).

12

Displaying column types/names for database connection


of layer 1:
INTEGER|cat
CHARACTER|CODE_00
DOUBLE PRECISION|AREA
# CODE_00
# o
integer 12.2
# sqlitebrowser
# v.db.addcol column=somename integer+ v.db.update

> v.dissolve corine_ellas_patched_clean out=


corine_ellas_clean_dissolved column=CODE_00
# o sqlite.db

v.db.addtable corine_ellas_clean_dissolved
# corine_ellas_tiles_patched

db.describe corine_ellas_clean_dissolved -c
ncols: 1
nrows: 39
Column 1: cat:INTEGER:20
# cat CORINE
# CORINE
(= grassrgb)12.3

> db.in.ogr dsn=/geo/geodata/europe/


corine_levels_lables_grassrgb/
corine_levels_labels_grassrgb.csv out=
corine_levels_labels_grassrgb
12.2
12.3

7, 46
, corine_levels_labels_grassrgb.csv, 83

68

db.tables -p

# / db.select corine_levels_labels_grassrgb | head

# CORINE12.4

> v.db.join corine_ellas_clean_dissolved column=cat


otable=corine_levels_labels_grassrgb ocolumn=
level3

# db.describe -c corine_ellas_clean_dissolved

db.select corine_ellas_clean_dissolved | head

[...]

> d.mon x0
> d.erase grey # this is optional!
> d.vect -a corine_ellas_clean_dissolved color=none
type=area

12.4

v.db.join

69

13
'


.
.

.

. :

( ) (=
). ,
.
&
%
#

# NUTSV9
# NUTSV9 laea

> v.in.ogr dsn=NUTSV9_LEAC.shp output=nutsv9 min_area


=0.0001 snap=-1
# N0CD

> v.extract input=nutsv9 output=nutsv9_ellas type=


boundary,centroid,area layer=1 new=-1 where=N0CD
="GR"
# () (=)
# 250

13

13.1: CORINE

> g.region vect=nutsv9 res=250 -pa


#
# **,
cat ()

> v.to.rast input=nutsv9_ellas output=nutsv9_ellas


use=cat type=area layer=1 value=1 rows=4096
#
# *-*13.1, 13.2



GRASS ( ) -
nodata NULL


13.1
13.2

no-data NULL
NULL support r.mapcalc http://grass.osgeo.org/

grass64/manuals/html64_user/r.mapcalc.html

72

r.mapcalc ellas=if(nutsv9_ellas != 0, 1, null())


# (-)
# -s(=smooth)

r.to.vect -s input=ellas output=ellas feature=area


# ellas corine_ellas_clean_dissolved13.3

> v.overlay ainput=corine_ellas_clean_dissolved atype


=area binput=ellas btype=area output=
corine_ellas_v2 operator=and olayer=1,0,0
v.info -c corine_ellas_v2
INTEGER|cat
INTEGER|a_cat
CHARACTER|a_level1
CHARACTER|a_label1
CHARACTER|a_label1_el
CHARACTER|a_level2
CHARACTER|a_label2
CHARACTER|a_label2_el
CHARACTER|a_level3
CHARACTER|a_label3
CHARACTER|a_label3_el
CHARACTER|a_grassrgb
INTEGER|b_cat
INTEGER|b_value
CHARACTER|b_label
# v.overlay

# grassrgb ,
** a_grassrgb grassrgb
!
# sqlitebrowser ... d.vect
13.3

(= )

73

14
CORINE
# , (
)

>
>
>
>

d.mon x0
d.erase grey
d.vect corine_ellas -a type=area color=none
d.barscale at=17,94 bcolor=150:150:150 tcolor=250:
250:250 -s
> d.barscale at=80,10 bcolor=150:150:150 tcolor=250:
250:250 -n

14.1: CORINE ETRS-LAEA

14 CORINE
#

# 14.1

> v.db.addcol corine_ellas column=area double


precision, area_ha double precision
> v.to.db corine_ellas option=area units=me column=
area
> v.to.db corine_ellas option=area units=h column=
area_ha
> echo "select cat, sum(area_ha) from corine_ellas
group by cat" | db.select

14.2: GRASS:
CORINE
14.1

.. ( 10.000 .. sq.m. m2 = 1 Ha )

76

( (14.3))
NVIZ: http://grass.itc.it/nviz

14.3: CORINE SRTM3

GRASS . ;-)

77

A CORINE
/ 3 CORINE
, , .

. (324).
( )
- ( ).

111

112

121

122

123

124

131

132

133

141

142

211

212

213

A CORINE

221

222

223

231

241

242

243

244

311

312

313

321

322

323

324

331

332

333

334

335

411

412

421

422

423

80

511

512

521

522

523

81

B CORINE csv
corine_levels_labels_grassrgb.csvB.1
CORINE, .
linuxB.2 , , GRASS.
grassrgb CORINE.
"level1","label1","label1_el","level2","label2","label2_el","level3","label3","label3_el","grassrgb"
1,"Artificial
surfaces","
",11,"Urban
fabric","
",111,"Continuous urban fabric"," ","230:000:077"
1,"Artificial
surfaces","
",11,"Urban
fabric","
",112,"Discontinuous urban fabric"," ","255:000:000"
1,"Artificial
surfaces","
",12,"Industrial,
commercial
and
transport
units",", ",121,"Industrial or commercial
units"," ","204:077:242"
1,"Artificial
surfaces","
",12,"Industrial,
commercial
and
transport
units",", ",122,"Road and rail networks and
associated land",", ","204:000:000"
1,"Artificial
surfaces","
",12,"Industrial,
commercial
and
transport
units",",

",123,"Port
areas","","230:204:204"
1,"Artificial
surfaces","
",12,"Industrial,
cial
and
transport
units",",

",124,"Airports","","230:204:230"

commer

1,"Artificial surfaces"," ",13,"Mine, dump and construction sites",",


",131,"Mineral extraction sites","","166:000:204"
1,"Artificial surfaces"," ",13,"Mine, dump and construction sites",",
",132,"Dump sites"," ","166:077:000"
1,"Artificial surfaces"," ",13,"Mine, dump and construction sites",",
",133,"Construction sites","","255:077:255"
B.1
B.2

csv= comma separated values,


- *nix : cut, tr, sed

B CORINE csv

1,"Artificial surfaces"," ",14,"Artificial non-agricultural vegetated areas"," ",141,"Green urban areas","


","255:166:255"
1,"Artificial surfaces"," ",14,"Artificial non-agricultural vegetated areas"," ",142,"Sport and leisure facilities","
","255:230:255"
2,"Agricultural areas"," ",21,"Arable land","
irrigated arable land"," ","255:255:168"

",211,"Non-

2,"Agricultural areas"," ",21,"Arable land"," ",212,"Permanently


irrigated land"," ","255:255:000"
2,"Agricultural areas","
fields","","230:230:000"

",21,"Arable

land","

2,"Agricultural
areas","
",22,"Permanent
",221,"Vineyards","","230:128:000"

",213,"Rice

crops","

2,"Agricultural
areas","
",22,"Permanent
crops","
",222,"Fruit trees and berry plantations"," ","242:166:077"
2,"Agricultural
areas","
",22,"Permanent
",223,"Olive groves","","230:166:000"

crops","

2,"Agricultural areas"," ",23,"Pastures","",231,"Pastures","",


"230:230:077"
2,"Agricultural areas"," ",24,"Heterogeneous agricultural areas","
",241,"Annual crops associated with permanent crops","
","255:230:166"
2,"Agricultural
areas","
",24,"Heterogeneous
agricultural
areas","

",242,"Complex
cultivation
patterns","
","255:230:077"
2,"Agricultural areas"," ",24,"Heterogeneous agricultural areas","
",243,"Land principally occupied by agriculture, with significant areas of natural
vegetation"," ","230:204:077"
2,"Agricultural areas"," ",24,"Heterogeneous agricultural areas","
",244,"Agro-forestry areas"," ","242:204:166"
3,"Forests and semi-natural areas"," ",31,"Forests","",311,"Broadleaved forest"," ","128:255:000"
3,"Forests
and
semi-natural
areas","

",31,"Forests","",312,"Coniferous forest"," ","000:166:000"

3,"Forests and semi-natural areas"," ",31,"Forests","",313,"Mixed


forest"," ","077:255:000"

84

3,"Forests and semi-natural areas"," ",32,"Shrub


herbaceous
vegetation
associations","

",321,"Natural
land","","204:242:077"

and/or
grass-

3,"Forests and semi-natural areas"," ",32,"Shrub and/or herbaceous


vegetation associations"," ",322,"Moors and heathland","
","166:255:128"
3,"Forests and semi-natural areas"," ",32,"Shrub and/or herbaceous
vegetation associations"," ",323,"Sclerophyllous vegetation","
","166:230:077"
3,"Forests and semi-natural areas"," ",32,"Shrub and/or herbaceous
vegetation associations"," ",324,"Transitional woodland-shrub","
","166:242:000"
3,"Forests and semi-natural areas"," ",33,"Open spaces with little or
no vegetation"," ",331,"Beaches, dunes, and sand
plains",", ","230:230:230"
3,"Forests and semi-natural areas"," ",33,"Open spaces with
little or no vegetation"," ",332,"Bare
rock","","204:204:204"
3,"Forests and semi-natural areas"," ",33,"Open spaces with little
or no vegetation"," ",333,"Sparsely vegetated areas"," ","204:255:204"
3,"Forests and semi-natural areas"," ",33,"Open spaces with little or no
vegetation"," ",334,"Burned areas"," ","000:000:000"
3,"Forests and semi-natural areas"," ",33,"Open spaces with little or
no vegetation"," ",335,"Glaciers and perpetual
snow"," ","166:230:204"
4,"Wetlands","",41,"Inland
marshes"," ","166:166:255"

wetlands","

4,"Wetlands","",41,"Inland
wetlands","
",412,"Peatbogs"," ","077:077:255"
4,"Wetlands","",42,"Coastal
marshes"," ","204:204:255"

wetlands","

",411,"Inland

",421,"Salt

4,"Wetlands","",42,"Coastal wetlands"," ",422,"Salines","",


"230:230:255"
4,"Wetlands","",42,"Coastal
wetlands","
flats"," ","166:166:230"

",423,"Intertidal

85

B CORINE csv

5,"Water bodies"," ",51,"Inland waters"," ",511,"Water


courses"," ","000:204:242"
5,"Water bodies"," ",51,"Inland waters"," ",512,"Water
bodies",", ","128:242:230"
5,"Water bodies"," ",52,"Marine waters","
",521,"Coastal lagoons","","000:255:166"
5,"Water bodies"," ",52,"Marine waters","
",522,"Estuaries"," ","166:255:230"
5,"Water bodies"," ",52,"Marine waters","
",523,"Sea and ocean","","230:242:255"

86


[1] GRASS Development Team, 2008. Geographic Resources Analysis Support System (GRASS) Software, Version 6.3.0. http://grass.osgeo.org.
[2] Markus Neteler and Helena Mitasova, 2008, Open Source GIS: A GRASS GIS
Approach. Third Edition. The International Series in Engineering and Computer
Science: Volume 773. 406 pages, 80 illus., Springer, New York.
[3] GRASS manual pages:

http://grass.osgeo.org/grass63/manuals/
html63_user/index.html.

[4] GRASS-user mailing list: http://lists.osgeo.org/mailman/listinfo/


grass-user.
[5] gdal-dev mailing list:
gdal-dev.

http://lists.osgeo.org/mailman/listinfo/

[6] CORINE 2000, NUTSv9 and EEA reference grid for Greece: EEA, Copenhagen,
2007, http://www.eea.europa.eu .
[7] SRTM3: Jarvis A., H.I. Reuter, A. Nelson, E. Guevara, 2006, Hole-filled seamless
SRTM data V3, International Centre for Tropical Agriculture (CIAT), available from

http://srtm.csi.cgiar.org