= How-To Test GRASS6 = == Scope of this page == This pages is intended to users and developers who want to test a GRASS installation (test protocol). As side effect, you can also showcase GRASS 6 using these commands. [[TOC]] == Requirements == * GRASS 6 installation ([wiki:DownloadSource source code] and [http://grass.osgeo.org/download/index.php binaries] download) * Educational data set: OSGeo Educational data set North Carolina: [http://grass.osgeo.org/sampledata/nc_spm_07_2007_dec20.tar.gz data] and [http://www.grassbook.org/data_menu3rd.php description]. Extract the NC sample data set for GRASS: {{{ mkdir $HOME/grassdata tar xvfz nc_spm_07_2007_dec20.tar.gz }}} == Start of the program == GRASS 6 is started either from the menu (if installed therein) or from command line. In all cases, select mapset "user1". {{{ # show available options grass63 --help }}} ''Expected result: the help text should be shown.'' {{{ # start with old Tcl/Tk based graphical user interface (d.m) grass63 -oldtcltk # start with current Tcl/Tk based graphical user interface (g.gis) grass63 -tcltk # start with wxPython based graphical user interface grass63 -wxpython }}} ''Expected result: the selected graphical user interface should come up.'' {{{ # start with text based interface grass63 -text }}} ''Expected result: the text user interface should come up.'' == Re-launch of GUI from command line == {{{ # start with old Tcl/Tk based graphical user interface (d.m) g.gui oldtcltk # start with current Tcl/Tk based graphical user interface (g.gis) g.gui tcltk # start with wxPython based graphical user interface g.gui wxpython }}} ''Expected result: the selected graphical user interface should come up.'' == Using gis.m graphical user interface == * Click in GIS manager on "Add raster" button, * click on word "raster" which appears in the canvas, * select "Raster name" button, select map "elevation", * click "ok", map name should appear in canvas, * click on "world map" button: should open GRASS map display * and show elevation map. * Try to zoom, to create a profile etc. ''Expected result: it should just work.'' == Using wxPython graphical user interface == * Click in Layer manager on "Add raster map" button, * select raster map "elevation" in properties dialog and click "ok", * right mouse click in layer tree and choose from contextual menu "Zoom to selected map", map should appear in canvas. * Try to zoom, to create a profile etc. ''Expected result: it should just work.'' == Display various maps in GRASS monitor (not native winGRASS) == {{{ g.region rast=elevation d.mon x0 d.rast elevation d.vect roadsmajor }}} ''Expected result: GRASS monitor should open and show the selected maps'' {{{ d.his i=elevation_shade h=elevation d.vect roadsmajor # set barscale position per mouse click into map: d.barscale -mt }}} == 3D visualiztion with NVIZ == {{{ # raster map and 2D vector lines map nviz elevation vect=roadsmajor }}} {{{ # raster map and 2D vector lines map and 3D vector points nviz elevation vect=roadsmajor points=precip_30ynormals_3d }}} Tests: navigate with the puck, interrogate map, etc. (ADD MORE) ''Expected result: should not crash at all but show maps as expected'' == Simple raster analysis == Raster analysis comprises a lot of functionality. === Raster algebra === Normalized Differences Vegetation Index (NDVI) from LANDSAT-TM7: {{{ # set current region/resolution to map: g.region rast=lsat7_2002_40 -p # display metadata: r.info -h lsat7_2002_40 # generate NDVI: r.mapcalc "ndvi = 1.0 * (lsat7_2002_40 - lsat7_2002_30) / (lsat7_2002_40+ lsat7_2002_30)" r.info -r ndvi r.colors ndvi color=ndvi # display 2D: d.mon x0 d.rast.leg ndvi d.vect streets_wake # display 3D: nviz elevation col=ndvi vect=streets_wake }}} ''Expected results: the NDVI map should be colorized in near natural colors'', see screenshot: [[Image(nc_ndvi.jpg)]] === Raster statistics === Univariate statistics: {{{ r.univar ndvi }}} ''Expected results: minimum: -0.956522, maximum: 0.978723, mean: 0.190006 etc.'' == Simple vector analysis == * TBD === Extracting from vector maps === * extract large streets from "streets_wake" === SQL support === {{{ g.region vect=schools_wake -p d.erase # show all schools in Wake County d.vect schools_wake col=red icon=basic/circle siz=5 # show a subset of all elementary schools in Raleigh d.vect schools_wake where="ADDRCITY='Raleigh' and GLEVEL='E'" }}} === Vector statistics === Univariate statistics: {{{ # show available columns v.info -c precip_30ynormals_3d v.univar precip_30ynormals_3d col=annual type=point }}} ''Expected result: mean: 1289.31 etc.'' === Transfer raster slope to vector segments === * v.split, v.to.db === Shortest path routing === * NC bus routes... map "busroutesall" == Using QGIS' GRASS toolbox == Start "qgis" within GRASS shell. * Go menu "Plugins, Pluginmanager, activate "GRASS plugin", OK button: a set of new buttons should appear * click "Add GRASS raster layer" button, select "elevation" map * click "Add GRASS raster layer" button, select "elevation_shade" map * click right mouse button in legend on "elevation_shade" map, move transparency to 40% * click "Add GRASS vector layer" button, select "roadsmajor" map, select layer "1-line" (level 1 is the topological level), OK