[QGIS Commit] r11391 - docs/trunk/english_us/user_guide

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Aug 15 17:02:00 EDT 2009


Author: micha
Date: 2009-08-15 17:01:59 -0400 (Sat, 15 Aug 2009)
New Revision: 11391

Modified:
   docs/trunk/english_us/user_guide/grass_integration.tex
Log:
Added a subsection of GRASS module examples with three examples so far

Modified: docs/trunk/english_us/user_guide/grass_integration.tex
===================================================================
--- docs/trunk/english_us/user_guide/grass_integration.tex	2009-08-15 19:44:38 UTC (rev 11390)
+++ docs/trunk/english_us/user_guide/grass_integration.tex	2009-08-15 21:01:59 UTC (rev 11391)
@@ -75,7 +75,7 @@
   layer will be visualized.
   \item Click on \toolbtntwo{grass_add_vector}{Add GRASS vector layer},
   choose the map name \filename{alaska} and click \button{OK}. The alaska
-  boundary vector layer will be overlayed on top of the gtopo30 map. You can
+  boundary vector layer will be overlayed on top of the \usertext{gtopo30} map. You can
   now adapt the layer properties as described in chapter \ref{sec:vectorprops},
   e.g. change opacity, fill and outline color.
   \item Also load the other two vector layers \filename{rivers} and
@@ -350,7 +350,7 @@
 \begin{Tip}\caption{\textsc{Digitizing polygones in GRASS}}
 \qgistip{
 If you want to create a polygone in GRASS, you first digitize the boundary of 
-the polygone, setting the mode to \usertext{No category}. Then you add a 
+the polygon, setting the mode to \usertext{No category}. Then you add a 
 centroid (label point) into the closed boundary, setting the mode to 
 \usertext{Next not used}. The reason is, that a topological vector model links 
 attribute information of a polygon always to the centroid and not to the 
@@ -602,9 +602,9 @@
 \subsubsection{GRASS module examples}\index{GRASS!toolbox}
 The following examples will demonstrate the power of some of the GRASS modules. 
 
-\underline{Creating contour lines}
-The first example creates a vector contour map from an elevation raster (DEM).  Assuming you have the Alaska \filename{LOCATION} set up as explained in Section \ref{sec:import_loc_data}, first open the location by clicking the \toolbtntwo{grass_open_mapset}{Open mapset}  button and choosing the Alaska location. Now load the gtopo30 elevation raster by clicking \toolbtntwo{grass_add_raster}{Add GRASS raster layer} and selecting the gtopo30 raster from the demo location.  Now open the Toolbox with the \toolbtntwo{grass_tools}{Open GRASS tools} button.  In the list of tool categories double click Raster->Surface Management->Generate vector contour lines. Now a single click on the tool r.contour will open the tool dialog as explained above \ref{grass_modules}.
-The gtopo30 raster should appear as the ``Name of input raster''. Type into the ``Increment between Contour levels'' the value 100. (This will create contour lines at intervals of 100 meters.) Type into the ``Name for output vector map'' the name ctour_100. And click Run to start the process. Wait for several moments until the message ``Successfully finished'' appears in the output window. Then click View Output and close. 
+\underline{Creating contour lines}\linebreak 
+The first example creates a vector contour map from an elevation raster (DEM).  Assuming you have the Alaska \filename{LOCATION} set up as explained in Section \ref{sec:import_loc_data}, first open the location by clicking the \toolbtntwo{grass_open_mapset}{Open mapset}  button and choosing the Alaska location. Now load the \usertext{gtopo30} elevation raster by clicking \toolbtntwo{grass_add_raster}{Add GRASS raster layer} and selecting the \usertext{gtopo30} raster from the demo location.  Now open the Toolbox with the \toolbtntwo{grass_tools}{Open GRASS tools} button.  In the list of tool categories double click Raster->Surface Management->Generate vector contour lines. Now a single click on the tool r.contour will open the tool dialog as explained above \ref{grass_modules}.
+The \usertext{gtopo30} raster should appear as the ``Name of input raster''. Type into the ``Increment between Contour levels'' the value 100. (This will create contour lines at intervals of 100 meters.) Type into the ``Name for output vector map'' the name \usertext{ctour\_100}. And click Run to start the process. Wait for several moments until the message \usertext{Successfully finished} appears in the output window. Then click View Output and close. 
 \begin{figure}[h]
 \centering
 \caption{GRASS Toolbox r.contour module \nixcaption}\label{fig:grass_toolbox_rcontour}
@@ -620,7 +620,7 @@
 }
 \end{Tip}  
 The purpose of this example is different. The contour lines created by r.contour have sharp angles that should be smoothed.  Among the v.generalize algorithms there is Chaikens which does just that (also Hermite splines). Be aware that these algorithm can \textbf{add}  additional vertices to the vector, causing it to load even more slowly.
-Open the GRASS toolbox and double click the categories Vector->Develop map->Generalization, then click on the v.generalize module to open its options window. Check that the ctour_100 vector appears as the input vector. From the list of algorithms choose Chaiken's. Leave all other options at their default, and scroll down to the last row to enter the Name for output vector map. Enter ctour_100_smooth as the new vector name, and click Run. The process takes several moments.  Once ``Successfully finished'' appears in the output windows, click View output and then close. You may change the color of the vector to display it clearly on the raster background and to contrast with the original contour lines. You will notice that the new contour lines have smoother corners than the original while staying faithful to the original overall shape.
+Open the GRASS toolbox and double click the categories Vector->Develop map->Generalization, then click on the v.generalize module to open its options window. Check that the \usertext{ctour\_100} vector appears as the input vector. From the list of algorithms choose Chaiken's. Leave all other options at their default, and scroll down to the last row to enter the Name for output vector map. Enter \usertext{ctour\_100\_smooth} as the new vector name, and click Run. The process takes several moments.  Once \usertext{Successfully finished} appears in the output windows, click View output and then close. You may change the color of the vector to display it clearly on the raster background and to contrast with the original contour lines. You will notice that the new contour lines have smoother corners than the original while staying faithful to the original overall shape.
 \begin{figure}[h]
  \begin{center}
  \caption{GRASS module v.generalize to smooth a vector map \nixcaption}\label{fig:grass_toolbox_vgeneralize}
@@ -633,13 +633,13 @@
 }
 \end{Tip}  
 
-\underline{Creating a Hillshade 3D effect}
+\underline{Creating a Hillshade 3D effect}\linebreak 
 Several methods are used to display elevation layers and give a 3D effect to maps. The use of contour lines as shown above is one popular method often chosen to produce topographic maps. Another way to display a 3D effect is by hillshading. The hillshade effect is created from a DEM (elevation) raster by first calculating the slope and aspect of each cell, then simulating the sun's position in the sky and giving a reflectance value to each cell. Thus you get sun facing slopes lighted and the slopes facing away from the sun (in shadow) are darkened.
-Begin this example by loading the gtopo30 elevation raster. Start the GRASS toolbox and under the Raster category double click to open Spatial analysis->Terrain analysis. Then click r.shaded.relief to open the module. Change the azimuth angle to 315. Enter gtopo30_shade for the new hillshade raster, and click run. When the process completes, add the hillshade raster to the map. You should see the hillshade raster displayed in grayscale. To view both the hill shading and the colors of the gtopo30 together shift the hillshade map below the gtopo30 map in the table of contents, then open the properties window of gtopo30, switch to the \tab{transparency} tab and set its transparency level to about 25\%. You should now have the gtopo30 elevation with its colormap and transparency setting displayed \textbf{above} the grayscale hillshade map. In order to see the visual effects of the hillshading, turn off the gtopo30_shade map, then turn it back on.
+Begin this example by loading the \usertext{gtopo30} elevation raster. Start the GRASS toolbox and under the Raster category double click to open Spatial analysis->Terrain analysis. Then click r.shaded.relief to open the module. Change the azimuth angle to 315. Enter \usertext{gtopo30\_shade} for the new hillshade raster, and click run. When the process completes, add the hillshade raster to the map. You should see the hillshade raster displayed in grayscale. To view both the hill shading and the colors of the \usertext{gtopo30} together shift the hillshade map below the \usertext{gtopo30} map in the table of contents, then open the properties window of \usertext{gtopo30}, switch to the \tab{transparency} tab and set its transparency level to about 25\%. You should now have the \usertext{gtopo30} elevation with its colormap and transparency setting displayed \textbf{above} the grayscale hillshade map. In order to see the visual effects of the hillshading, turn off the \usertext{gtopo30\_shade} map, then turn it back on.
 
-\underline{Raster statistics in a vector map}
-The next example shows how a GRASS module aggregates raster data and adds columns of statistics for each polygon in a vector map. Again using the Alaska data, refer to \ref{sec:import_loc_data} to import the trees shapefile from the \filename{vmap0_shapefiles} directory into GRASS.  Now an intermediary step is required: centroids must be added to the imported trees map to make it a complete GRASS ``area'' vector (including boundaries with centroids).  From the toolbox choose Vector->Manage features, and open the module v.centroids. Enter as the output vector map forest_areas and run the module.  Now load the forest_areas vector and display the types of forests - deciduous, evergreen, mixed - in different colors: In the layer properties window, \tab{symbology} tab, choose Unique value and set the Classification field to VEGDESC. (Refer to the explanation of the symbology tab \ref{sec:symbology} in the vector section).
-Next reopen the GRASS toolbox and open Vector->Vector update by other maps. Click on the v.rast.stats module. Name of raster should be gtopo30, and Name of vector polygon should be forest_areas. Only one additional parameter is needed: Enter ``elev'' as the column prefix, and click run. This is a computationally heavy operation which will run for a long time.
+\underline{Raster statistics in a vector map}\linebreak 
+The next example shows how a GRASS module aggregates raster data and adds columns of statistics for each polygon in a vector map. Again using the Alaska data, refer to \ref{sec:import_loc_data} to import the trees shapefile from the \usertext{vmap0\_shapefiles} directory into GRASS.  Now an intermediary step is required: centroids must be added to the imported trees map to make it a complete GRASS area vector (including boundaries with centroids).  From the toolbox choose Vector->Manage features, and open the module v.centroids. Enter as the output vector map \usertext{forest\_areas} and run the module.  Now load the \usertext{forest\_areas} vector and display the types of forests - deciduous, evergreen, mixed - in different colors: In the layer properties window, \tab{symbology} tab, choose Unique value and set the Classification field to VEGDESC. (Refer to the explanation of the symbology tab \ref{sec:symbology} in the vector section).
+Next reopen the GRASS toolbox and open Vector->Vector update by other maps. Click on the v.rast.stats module. Name of raster should be \usertext{gtopo30}, and Name of vector polygon should be \usertext{forest\_areas}. Only one additional parameter is needed: Enter \usertext{elev} as the column prefix, and click run. This is a computationally heavy operation which will run for a long time (probably up to two hours). Finally open the \usertext{forest\_areas} attribute table, and verify that several new columns have been added including \usertext{elev\_min},\usertext{elev\_max},\usertext{elev\_mean} etc for each forest polygon.
 
 
 



More information about the QGIS-commit mailing list