grass short course intro - grassbook.org filemarkus neteler, itcirst, 2004. grass course m a r k u s...
TRANSCRIPT
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Advanced DatabasesPart 1: Introduction to GRASS
Markus Neteler, ITCirst, 2004
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Outline
Software Licenses, GRASS History
GRASS Database structure Linux file system structure
Launching GRASS Sample session with 'Spearfish' dataset
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Software Licenses: Free Software vs. nonfree
Free Download
Free Software
Public domain
Xfree86 Style
Copylefted
GPL'ed
Open Source
Shareware
Closed Source
Proprietary
From GNU web site
GRASS: General Public License GPL
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
GRASS History
1993
1998
1999
GRASS 4.1
GRASS 4.2.1/4.3
GRASS 5.0
GRASS 5.7
2001
GPL'ed
1997
GRASS 4.2
Manual code management
Automated code management (CVS)
PD
U.S. Army (19841995)
GRASS Development Team (1997 present)
http://grass.itc.it
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
GRASS Web site
GRASS main web site
http://grass.itc.it
Download: Current versions 5.0.x, 5.3.x, 5.7.x
Documentation: “GRASS Documentation Project” (GDP)
Sample data: “Spearfish location” South Dakota, USA
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Setup in DIT computer lab
The installation of the software is done in /usr/local/grass57 which is a network directory (single installation for all users)
The 'Spearfish' data set is installed in another network directory (/utenti/grassdata/spearfish)
The GRASS users have to store their data on a local disk (/scratch/ directory). This requires to create a link from the network data directory containing the common maps to the local directory:
cd /scratch/grassdata/spearfishln s /utenti/grassdata/spearfish/PERMANENT PERMANENT
Then GRASS can be launched. You will work in/scratch/grassdata/spearfish in your own mapset but also see thecommon data from the PERMANENT mapset.
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Starting with GRASS
Start GRASS 5.7:
grass57 -gui
Database: /scratch/grassdata/ <return>Location: spearfish (click)Mapset: if not present, generate it (right field)
Then click “Use selection”
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
GRASS Database structure: Locations and Mapsets
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
UN*X/Linux file structure
/ root directory
eva
dev home media opt usr sbin varbin
markus
local
mailgrassdata pub test
grass57
log
...
dvd
bin
lib
lib
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
UN*X/Linux file structure
chmod -r ugo+wrx <dateiname/ordner>chown -R root <Dateiname/Ordner>chgrp -R mail <Dateiname/Ordner>
Permissions | user | group | size | date | file / directory
other r : readgroup w : write user x : execute : file d : directory (subdirectory) l : link (redirection)
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Starting with GRASS
Run the following commands:
g.list rast
g.list vect
Convert vector map from old format to current format:
v.convert in=roads out=roadsg.list vect
d.m- add raster map 'elevation.dem'- add vector map 'roads'- display (world map symbol)
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Starting with GRASS
Query map (select first)
Zoom
(Re)display entire location
(Re)display current region
Attributes
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Warming up with GRASS
Continue with the following commands (conversion of old points format to current vector format):
v.in.sites in=archsites out=archsites
d.m add vector map 'archsites'
select icon symbol 'basic/diamond' display (world map symbol)
display attributes of 'archsites' map (str1 column)to find column names, query the map
select only 'interstates' by SQL statement
save d.m settings to file
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Warming up with GRASS
Continue with the following command:nviz el=elevation.dem vect=roads
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Raster data model
2D raster model (matrix)commands: r.*
3D raster model (voxels)commands: r3.*
2D rasterwith shading
3D voxels
Scanned topographic sheet
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Vector data model
2D/3D vector modelcommands: v.*
TIN
CAD
City vector map
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Using GRASS
What else for the first day?
Restart GRASS, read the manual: g.manual
r.info elevation.dem
v.info roads
v.format/v.database: define data storage settings
d.m: print function
GRASS CourseM
ark
us N
ete
ler
– IT
C-i
rst
20
04
Leaving GRASS
To finish a GRASS session:
Close all monitors by mouse click
Save 'd.m' settings (name with extension: “.dmrc”), close 'd.m'
To leave GRASS, enter into terminal window:
exit