「Grass integration」の版間の差分

提供: OSGeo.JP Wiki
移動: 案内検索
(タグ・画像調整前に一旦配下を統合)
(Table Tab)
 
(2人の利用者による、間の20版が非表示)
行1: 行1:
<H1>
+
== GRASS GISの機能を利用する ==
GRASS GIS Integration
+
<span id='sec:grass'></span>
</H1>
+
  
<P>
+
The GRASS plugin provides access to GRASS GIS {{Template:Cite|num=4|ref=GRASSweb}} databases and  
The GRASS plugin provides access to GRASS GIS&nbsp;[#!GRASSweb!#] databases and  
+
 
functionalities. This includes visualization of GRASS raster and vector  
 
functionalities. This includes visualization of GRASS raster and vector  
 
layers, digitizing vector layers, editing vector attributes, creating new  
 
layers, digitizing vector layers, editing vector attributes, creating new  
行10: 行8:
 
modules.
 
modules.
  
<P>
 
 
In this Section we'll introduce the plugin functionalities and give some  
 
In this Section we'll introduce the plugin functionalities and give some  
 
examples on managing and working with GRASS data. Following main features  
 
examples on managing and working with GRASS data. Following main features  
 
are provided with the toolbar menu, when you start the GRASS plugin, as  
 
are provided with the toolbar menu, when you start the GRASS plugin, as  
described in Section&nbsp;<A HREF="node2.html#sec:starting_grass">9.1</A>:
+
described in Section [[#sec:starting_grass|9.1]]:
 +
 +
<ul>
 +
<li>{{Template:ToolBtnTwo|grass_open_mapset|Open mapset}}
 +
<li>{{Template:ToolBtnTwo|grass_new_mapset|New mapset}}
 +
<li>{{Template:ToolBtnTwo|grass_close_mapset|Close mapset}}
 +
<li>{{Template:ToolBtnTwo|grass_add_vector|Add GRASS vector layer}}
 +
<li>{{Template:ToolBtnTwo|grass_add_raster|Add GRASS raster layer}}
 +
<li>{{Template:ToolBtnTwo|grass_new_vector_layer|Create new GRASS vector}}
 +
<li>{{Template:ToolBtnTwo|grass_edit|Edit GRASS vector layer}}
 +
<li>{{Template:ToolBtnTwo|grass_tools|Open GRASS tools}}
 +
<li>{{Template:ToolBtnTwo|grass_region|Display current GRASS region}}
 +
<li>{{Template:ToolBtnTwo|grass_region_edit|Edit current GRASS region}}
 +
</ul>
  
<P>
+
=== GRASSプラグインを使ってみよう ===
 +
<span id='sec:starting_grass'></span>
  
<UL>
 
<LI>grass_open_mapsetOpen mapset
 
</LI>
 
<LI>grass_new_mapsetNew mapset
 
</LI>
 
<LI>grass_close_mapsetClose mapset
 
</LI>
 
<LI>grass_add_vectorAdd GRASS vector layer
 
</LI>
 
<LI>grass_add_rasterAdd GRASS raster layer
 
</LI>
 
<LI>grass_new_vector_layerCreate new GRASS vector
 
</LI>
 
<LI>grass_editEdit GRASS vector layer
 
</LI>
 
<LI>grass_toolsOpen GRASS tools
 
</LI>
 
<LI>grass_regionDisplay current GRASS region
 
</LI>
 
<LI>grass_region_editEdit current GRASS region
 
</LI>
 
</UL>
 
 
<P>
 
<BR><HR>
 
<!--Table of Child-Links-->
 
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
 
 
<UL CLASS="ChildLinks">
 
<LI><A NAME="tex2html68"
 
  HREF="node2.html">Starting the GRASS plugin</A>
 
<LI><A NAME="tex2html69"
 
  HREF="node3.html">Loading GRASS raster and vector layers</A>
 
<LI><A NAME="tex2html70"
 
  HREF="node4.html">GRASS LOCATION and MAPSET</A>
 
<UL>
 
<LI><A NAME="tex2html71"
 
  HREF="node5.html">Creating a new GRASS LOCATION</A>
 
<LI><A NAME="tex2html72"
 
  HREF="node6.html">Adding a new MAPSET</A>
 
</UL>
 
<BR>
 
<LI><A NAME="tex2html73"
 
  HREF="node7.html">Importing data into a GRASS LOCATION</A>
 
<LI><A NAME="tex2html74"
 
  HREF="node8.html">The GRASS vector data model</A>
 
<LI><A NAME="tex2html75"
 
  HREF="node9.html">Creating a new GRASS vector layer</A>
 
<LI><A NAME="tex2html76"
 
  HREF="node10.html">Digitizing and editing a GRASS vector layer</A>
 
<LI><A NAME="tex2html77"
 
  HREF="node11.html">The GRASS region tool</A>
 
<LI><A NAME="tex2html78"
 
  HREF="node12.html">The GRASS toolbox</A>
 
<UL>
 
<LI><A NAME="tex2html79"
 
  HREF="node13.html">Working with GRASS modules</A>
 
<LI><A NAME="tex2html80"
 
  HREF="node14.html">Working with the GRASS LOCATION browser</A>
 
<LI><A NAME="tex2html81"
 
  HREF="node15.html">Customizing the GRASS Toolbox</A>
 
</UL></UL>
 
<!--End of Table of Child-Links-->
 
<BR><HR>
 
 
<H2>
 
Starting the GRASS plugin
 
</H2>
 
 
<br>
 
 
To use GRASS functionalities and/or visualize GRASS vector and raster layers  
 
To use GRASS functionalities and/or visualize GRASS vector and raster layers  
 
in QGIS, you must select and load the GRASS plugin with the Plugin Manager.  
 
in QGIS, you must select and load the GRASS plugin with the Plugin Manager.  
Therefore click the menu Plugins &gt; Manage Plugins,  
+
Therefore click the menu {{Template:MainMenuOpt|Plugins}} > {{Template:MainMenuOpt|Manage Plugins}},  
select GRASS and click OK.  
+
select {{Template:DropMenuOpt|GRASS}} and click {{Template:Button|OK}}.  
  
<br>
 
 
You can now start loading raster and vector layers from an existing GRASS  
 
You can now start loading raster and vector layers from an existing GRASS  
LOCATION (see Section [[#sec:load_grassdata|9.2]]). Or you create a  
+
{{Template:FileName|LOCATION}} (see Section [[#sec:load_grassdata|9.2]]). Or you create a  
new GRASS LOCATION with QGIS (see Section [[#sec:create_loc|9.3.1]])  
+
new GRASS {{Template:FileName|LOCATION}} with QGIS (see Section [[#sec:create_loc|9.3.1]])  
 
and import some raster and vector data (see Section [[#sec:import_loc_data|9.4]])  
 
and import some raster and vector data (see Section [[#sec:import_loc_data|9.4]])  
 
for further analysis with the GRASS Toolbox (see Section  
 
for further analysis with the GRASS Toolbox (see Section  
 
[[#subsec:grass_toolbox|9.9]]).
 
[[#subsec:grass_toolbox|9.9]]).
  
<H2>
+
=== GRASSラスター、ベクターレイヤをロードする ===
Loading GRASS raster and vector layers
+
<span id='sec:load_grassdata'></span>
</H2>
+
  
<P>
 
 
With the GRASS plugin, you can load vector or raster layers using the
 
With the GRASS plugin, you can load vector or raster layers using the
 
appropriate button on the toolbar menu. As an example we use the QGIS alaska
 
appropriate button on the toolbar menu. As an example we use the QGIS alaska
dataset (see Section [[#label_sampledata]]). It includes a small sample  
+
dataset (see Section [[label_sampledata]]). It includes a small sample  
GRASS LOCATION with 3 vector layers and 1 raster elevation map.
+
GRASS {{Template:FileName|LOCATION}} with 3 vector layers and 1 raster elevation map.
 
+
<P>
+
  
<OL>
+
<ol>
<LI>Create a new folder grassdata, download the QGIS alaska dataset qgis_sample_data.zip from http://download.osgeo.org/qgis/data/ and unzip the file into grassdata.  
+
  <li>Create a new folder {{Template:FileName|grassdata}}, download the QGIS alaska
</LI>
+
  dataset {{Template:FileName|qgis_sample_data.zip}} from
<LI>Start QGIS.
+
  {{Template:URL|http://download.osgeo.org/qgis/data/}} and unzip the file into
</LI>
+
  {{Template:FileName|grassdata}}.  
<LI>If not already done in a previous QGIS session, load the GRASS plugin clicking on Plugins &gt; Manage Plugins and selecting GRASS. The GRASS toolbar appears on the toolbar menu.
+
  <li>Start QGIS.
</LI>
+
  <li>If not already done in a previous QGIS session, load the GRASS plugin
<LI>In the GRASS toolbar, click the grass_open_mapsetOpen
+
  clicking on {{Template:MainMenuOpt|Plugins}} > {{Template:MainMenuOpt|Manage Plugins}} and
   mapset icon to bring up the MAPSET wizard.
+
  selecting {{Template:DropMenuOpt|GRASS}}. The GRASS toolbar appears on the toolbar menu.
</LI>
+
  <li>In the GRASS toolbar, click the {{Template:ToolBtnTwo|grass_open_mapset|Open
<LI>For Gisdbase browse and select or enter the path to the
+
   mapset}} icon to bring up the {{Template:FileName|MAPSET}} wizard.
   newly created folder grassdata.
+
  <li>For {{Template:FileName|Gisdbase}} browse and select or enter the path to the
</LI>
+
   newly created folder {{Template:FileName|grassdata}}.
<LI>You should now be able to select the LOCATION alaska
+
  <li>You should now be able to select the {{Template:FileName|LOCATION alaska}}
   and the MAPSET demo.  
+
   and the MAPSET {{Template:FileName|demo}}.  
</LI>
+
  <li>Click {{Template:Button|OK}}. Notice that some previously disabled tools in the  
<LI>Click OK. Notice that some previously disabled tools in the  
+
 
   GRASS toolbar are now enabled.
 
   GRASS toolbar are now enabled.
</LI>
+
  <li>Click on {{Template:ToolBtnTwo|grass_add_raster|Add GRASS raster layer}},
<LI>Click on grass_add_rasterAdd GRASS raster layer,
+
   choose the map name {{Template:FileName|gtopo30}} and click {{Template:Button|OK}}. The elevation
   choose the map name gtopo30 and click OK. The elevation
+
 
   layer will be visualized.
 
   layer will be visualized.
</LI>
+
  <li>Click on {{Template:ToolBtnTwo|grass_add_vector|Add GRASS vector layer}},
<LI>Click on grass_add_vectorAdd GRASS vector layer,
+
   choose the map name {{Template:FileName|alaska}} and click {{Template:Button|OK}}. The alaska
   choose the map name alaska and click 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 gtopo30 map. You can
   now adapt the layer properties as described in chapter [[#sec:vectorprops]],
+
   now adapt the layer properties as described in chapter [[sec:vectorprops]],
 
   e.g. change opacity, fill and outline color.
 
   e.g. change opacity, fill and outline color.
</LI>
+
  <li>Also load the other two vector layers {{Template:FileName|rivers}} and
<LI>Also load the other two vector layers rivers and
+
   {{Template:FileName|airports}} and adapt their properties.
   airports and adapt their properties.
+
</ol>
</LI>
+
</OL>
+
  
<P>
 
 
As you see, it is very simple to load GRASS raster and vector layers in QGIS.  
 
As you see, it is very simple to load GRASS raster and vector layers in QGIS.  
 
See following Sections for editing GRASS data and creating a new  
 
See following Sections for editing GRASS data and creating a new  
LOCATION. More sample GRASS LOCATIONs are available at  
+
{{Template:FileName|LOCATION}}. More sample GRASS {{Template:FileName|LOCATIONs}} are available at  
the GRASS website at http://grass.osgeo.org/download/data.php .
+
the GRASS website at {{Template:URL|http://grass.osgeo.org/download/data.php}}.
  
<P>
+
{{Template:Tip
<BR>
+
|num=34
 +
|caption=GRASS Data Loading
 +
|qgistip=If you have problems loading data or QGIS terminates abnormally,
 +
check to make sure you have loaded the GRASS plugin properly as described in
 +
Section [[#sec:starting_grass|9.1]].
  
<BR>
+
}}
  
<P>
+
=== GRASSのLOCATIONとMAPSETについて ===
 +
<span id='sec:about_loc'></span>
  
<H2>
 
GRASS LOCATION and MAPSET
 
</H2>
 
 
<P>
 
 
GRASS data are stored in a directory referred to as GISDBASE. This directory  
 
GRASS data are stored in a directory referred to as GISDBASE. This directory  
often called grassdata, must be created before you start working  
+
often called {{Template:FileName|grassdata}}, must be created before you start working  
 
with the GRASS plugin in QGIS. Within this directory, the GRASS GIS data  
 
with the GRASS plugin in QGIS. Within this directory, the GRASS GIS data  
are organized by projects stored in subdirectories called LOCATION.  
+
are organized by projects stored in subdirectories called {{Template:FileName|LOCATION}}.  
Each LOCATION is defined by its coordinate system, map projection  
+
Each {{Template:FileName|LOCATION}} is defined by its coordinate system, map projection  
and geographical boundaries. Each LOCATION can have several  
+
and geographical boundaries. Each {{Template:FileName|LOCATION}} can have several  
MAPSETs (subdirectories of the LOCATION) that are used  
+
{{Template:FileName|MAPSETs}} (subdirectories of the {{Template:FileName|LOCATION}}) that are used  
 
to subdivide the project into different topics, subregions, or as workspaces  
 
to subdivide the project into different topics, subregions, or as workspaces  
for individual team members (Neteler &amp; Mitasova 2008  
+
for individual team members (Neteler & Mitasova 2008  
[#!neteler_mitasova08!#]). In order to analyze vector and raster layers with  
+
{{Template:Cite|num=2|ref=neteler_mitasova08}}). In order to analyze vector and raster layers with  
GRASS modules, you must import them into a GRASS LOCATION.
+
GRASS modules, you must import them into a GRASS {{Template:FileName|LOCATION}}.
[[footnode.html#foot485]]></A>
+
<ref>This is not strictly true - with the GRASS modules
<P>
+
{{Template:FileName|r.external}} and {{Template:FileName|v.external}} you can create read-only links
 +
to external GDAL/OGR-supported data sets without importing them. But because
 +
this is not the usual way for beginners to work with GRASS, this functionality
 +
will not be described here.</ref>
  
<DIV ALIGN="CENTER"><A NAME="fig:grass_location"></A><A NAME="486"></A>
+
<table align='center'>
<TABLE>
+
<caption>'''図 25:''' GRASS data in the alaska LOCATION (adapted from Neteler &  
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 27:</STRONG>
+
Mitasova 2008 {{Template:Cite|num=2|ref=neteler_mitasova08)}}</caption>
GRASS data in the alaska LOCATION (adapted from Neteler &amp;
+
<tr><td><span id='fig:grass_location'></span>
Mitasova 2008 [#!neteler_mitasova08!#])</CAPTION>
+
[[File:grass_location.png]]</td></tr></table>
<TR><TD>
+
<DIV ALIGN="CENTER">
+
</DIV>
+
<P></P>
+
<DIV ALIGN="CENTER">[clip=true]grass_location
+
  
</DIV></TD></TR>
+
==== Creating a new GRASS LOCATION ====
</TABLE>
+
<span id='sec:create_loc'></span>
</DIV>
+
  
<P>
 
<BR><HR>
 
<!--Table of Child-Links-->
 
<STRONG>Subsections</STRONG>
 
 
<UL CLASS="ChildLinks">
 
<LI>[[Creating a new GRASS LOCATION]]
 
<LI>[[Adding a new MAPSET]]
 
</UL>
 
<!--End of Table of Child-Links-->
 
 
<H3>
 
Creating a new GRASS LOCATION
 
</H3>
 
 
<P>
 
 
As an an example you find the instructions how the sample GRASS
 
As an an example you find the instructions how the sample GRASS
LOCATION alaska, which is projected in Albers Equal Area
+
{{Template:FileName|LOCATION alaska}}, which is projected in Albers Equal Area
 
projection with unit feet was created for the QGIS sample dataset. This
 
projection with unit feet was created for the QGIS sample dataset. This
sample GRASS LOCATION alaska will be used for all examples and
+
sample GRASS {{Template:FileName|LOCATION alaska}} will be used for all examples and
 
exercises in the following GRASS GIS related chapters. It is useful to
 
exercises in the following GRASS GIS related chapters. It is useful to
download and install the dataset on your computer [[#label_sampledata]]">>).
+
download and install the dataset on your computer [[label_sampledata]]).
 
+
<P>
+
 
+
<DIV ALIGN="CENTER"><A NAME="fig:create_grass_location"></A><A NAME="107"></A>
+
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
Creating a new GRASS LOCATION or a new MAPSET in QGIS </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
</DIV>
+
<P></P>
+
<DIV ALIGN="CENTER">[clip=true, width=10cm]create_grass_location
+
 
+
</DIV></TD></TR>
+
</TABLE>
+
</DIV>
+
  
<P>
+
<table align='center'>
 +
<caption>'''図 26:''' Creating a new GRASS LOCATION or a new MAPSET in QGIS {{Template:Nix}}</caption>
 +
<tr><td>
 +
<span id='fig:create_grass_location'></span>
 +
[[File:create_grass_location.png|378px]]</td></tr></table>
  
<OL>
+
<ol>
<LI>Start QGIS and make sure the GRASS plugin is loaded
+
  <li>Start QGIS and make sure the GRASS plugin is loaded
</LI>
+
  <li>Visualize the {{Template:FileName|alaska.shp}} Shapefile (see Section
<LI>Visualize the alaska.shp Shapefile (see Section
+
  [[sec:load_shapefile]]) from the QGIS alaska dataset~[[label_sampledata]].
[[#sec:load_shapefile]]) from the QGIS alaska dataset&nbsp;[[#label_sampledata]].
+
  <li>In the GRASS toolbar, click on the {{Template:ToolBtnTwo|grass_open_mapset|Open
</LI>
+
     mapset}} icon to bring up the {{Template:FileName|MAPSET}} wizard.
<LI>In the GRASS toolbar, click on the grass_open_mapsetOpen
+
  <li>Select an existing GRASS database (GISDBASE) folder  
     mapset icon to bring up the MAPSET wizard.
+
   {{Template:FileName|grassdata}} or create one for the new {{Template:FileName|LOCATION}} using a  
</LI>
+
   file manager on your computer. Then click {{Template:Button|Next}}.  
<LI>Select an existing GRASS database (GISDBASE) folder  
+
  <li>We can use this wizard to create a new {{Template:FileName|MAPSET}} within an  
   grassdata or create one for the new LOCATION using a  
+
   existing {{Template:FileName|LOCATION}} (see Section~[[sec:add_mapset]]) or to create  
   file manager on your computer. Then click Next.  
+
   a new {{Template:FileName|LOCATION}} altogether. Click on the radio button
</LI>
+
   {{Template:RadioButtonOn|Create new location}} (see Figure [[#fig:create_grass_location|26]]).
<LI>We can use this wizard to create a new MAPSET within an  
+
  <li>Enter a name for the {{Template:FileName|LOCATION}} - we used alaska and click  
   existing LOCATION (see Section&nbsp;[[node6.html#sec:add_mapset|9.3.2]]) or to create  
+
   {{Template:Button|Next}}
   a new LOCATION altogether. Click on the radio button
+
  <li>Define the projection by clicking on the radio button
   Create new location (see Figure [[#fig:create_grass_location|28]]).
+
   {{Template:RadioButtonOn|Projection}} to enable the projection list  
</LI>
+
  <li>We are using Albers Equal Area Alaska (feet) projection. Since we
<LI>Enter a name for the LOCATION - we used alaska and click  
+
   Next  
+
</LI>
+
<LI>Define the projection by clicking on the radio button
+
   Projection to enable the projection list  
+
</LI>
+
<LI>We are using Albers Equal Area Alaska (feet) projection. Since we
+
 
   happen to know that it is represented by the EPSG ID 2964, we enter it in
 
   happen to know that it is represented by the EPSG ID 2964, we enter it in
 
   the search box. (Note: If you want to repeat this process for another  
 
   the search box. (Note: If you want to repeat this process for another  
   LOCATION and projection and haven't memorized the EPSG ID,  
+
   {{Template:FileName|LOCATION}} and projection and haven't memorized the EPSG ID,  
 
   click on the
 
   click on the
   mIconProjectionEnabledprojector icon in the lower right-hand
+
   {{Template:ToolBtnTwo|mIconProjectionEnabled|projector}} icon in the lower right-hand
   corner of the status bar (see Section [[#label_projstart]]).
+
   corner of the status bar (see Section [[label_projstart]])).
</LI>
+
  <li>Click {{Template:Button|Find}} to select the projection
<LI>Click Find to select the projection
+
  <li>Click {{Template:Button|Next}}
</LI>
+
  <li>To define the default region, we have to enter the {{Template:FileName|LOCATION}}
<LI>Click Next  
+
</LI>
+
<LI>To define the default region, we have to enter the LOCATION  
+
 
   bounds in north, south, east, and west direction. Here we simply click on  
 
   bounds in north, south, east, and west direction. Here we simply click on  
   the button Set current QGIS extent, to apply the extend of the  
+
   the button {{Template:Button|Set current QGIS extent}}, to apply the extend of the  
   loaded layer alaska.shp as the GRASS default region extend.
+
   loaded layer {{Template:FileName|alaska.shp}} as the GRASS default region extend.
</LI>
+
  <li>Click {{Template:Button|Next}}
<LI>Click Next  
+
  <li>We also need to define a {{Template:FileName|MAPSET}} within our new  
</LI>
+
   {{Template:FileName|LOCATION}}. You can name it whatever you like - we used demo.
<LI>We also need to define a MAPSET within our new  
+
  <ref>{When creating a new {{Template:FileName|LOCATION}}, GRASS automatically
   LOCATION. You can name it whatever you like - we used demo.
+
  creates a special {{Template:FileName|MAPSET}} called {{Template:FileName|PERMANENT}} designed to
[[footnode.html#foot487]]
+
  store the core data for the project, its default spatial extend and
</LI>
+
  coordinate system definitions (Neteler & Mitasova 2008
<LI>Check out the summary to make sure it's correct and click
+
  {{Template:Cite|num=2|ref=neteler_mitasova08}}).</ref>
   Finish  
+
  <li>Check out the summary to make sure it's correct and click
</LI>
+
   {{Template:Button|Finish}}
<LI>The new LOCATION alaska and two MAPSETs demo
+
  <li>The new {{Template:FileName|LOCATION alaska}} and two {{Template:FileName|MAPSETs demo}}
   and PERMANENT are created. The currently opened working set is
+
   and {{Template:FileName|PERMANENT}} are created. The currently opened working set is
   MAPSET demo, as you defined.
+
   {{Template:FileName|MAPSET demo}}, as you defined.
</LI>
+
  <li>Notice that some of the tools in the GRASS toolbar that were  
<LI>Notice that some of the tools in the GRASS toolbar that were  
+
 
   disabled are now enabled.
 
   disabled are now enabled.
</LI>
+
</ol>
</OL>
+
  
<P>
 
 
If that seemed like a lot of steps, it's really not all that bad and a very  
 
If that seemed like a lot of steps, it's really not all that bad and a very  
quick way to create a LOCATION. The LOCATION alaska is  
+
quick way to create a {{Template:FileName|LOCATION}}. The {{Template:FileName|LOCATION alaska}} is  
now ready for data import (see Section [[node7.html#sec:import_loc_data|9.4]]).
+
now ready for data import (see Section [[#sec:import_loc_data|9.4]]).
 
You can also use the already existing vector and raster data in the sample  
 
You can also use the already existing vector and raster data in the sample  
GRASS LOCATION alaska included in the QGIS alaska dataset  
+
GRASS {{Template:FileName|LOCATION alaska}} included in the QGIS alaska dataset  
[[#label_sampledata]] and move on to Section [[node8.html#label_vectmodel|9.5]].
+
[[label_sampledata]] and move on to Section [[#label_vectmodel|9.5]].
  
<P>
+
==== Adding a new MAPSET ====
 +
<span id='sec:add_mapset'></span>
  
<H3>
+
A user has only write access to a GRASS {{Template:FileName|MAPSET}} he created. This
Adding a new MAPSET
+
means, besides access to his own {{Template:FileName|MAPSET}}, each user can also read
</H3>
+
maps in other user's {{Template:FileName|MAPSETs}}, but he can modify or remove only
 +
the maps in his own {{Template:FileName|MAPSET}}. All {{Template:FileName|MAPSETs}} include a
 +
{{Template:FileName|WIND}} file that stores the current boundary coordinate values and
 +
the currently selected raster resolution (Neteler & Mitasova 2008
 +
{{Template:Cite|num=2|ref=neteler_mitasova08}}, see Section [[#sec:grass_region|9.8]]).
  
<P>
+
<ol>
A user has only write access to a GRASS MAPSET he created. This
+
  <li>Start QGIS and make sure the GRASS plugin is loaded
means, besides access to his own MAPSET, each user can also read
+
  <li>In the GRASS toolbar, click on the
maps in other user's MAPSETs, but he can modify or remove only
+
  {{Template:ToolBtnTwo|grass_new_mapset|New mapset}} icon to bring up the
the maps in his own MAPSET. All MAPSETs include a  
+
  {{Template:FileName|MAPSET}} wizard.
WIND file that stores the current boundary coordinate values and
+
  <li>Select the GRASS database (GISDBASE) folder {{Template:FileName|grassdata}}
the currently selected raster resolution (Neteler &amp; Mitasova 2008
+
  with the {{Template:FileName|LOCATION alaska}}, where we want to add a further
[#!neteler_mitasova08!#], see Section <A HREF="node11.html#sec:grass_region">9.8</A>).
+
  {{Template:FileName|MAPSET}}, called test.
 +
  <li>Click {{Template:Button|Next}}.
 +
  <li>We can use this wizard to create a new {{Template:FileName|MAPSET}} within an
 +
  existing {{Template:FileName|LOCATION}} or to create a new {{Template:FileName|LOCATION}}
 +
  altogether. Click on the radio button {{Template:RadioButtonOn|Select location}}
 +
  (see Figure [[#fig:create_grass_location|26]]) and click {{Template:Button|Next}}.
 +
  <li>Enter the name {{Template:FileName|text}} for the new {{Template:FileName|MAPSET}}. Below
 +
  in the wizard you see a list of existing {{Template:FileName|MAPSETs}} and its owners.
 +
  <li>Click {{Template:Button|Next}}, check out the summary to make sure it's all
 +
  correct and click {{Template:Button|Finish}}
 +
</ol>
  
<P>
+
=== GRASS LOCATIONのインポート ===
 +
<span id='sec:import_loc_data'></span>
  
<OL>
 
<LI>Start QGIS and make sure the GRASS plugin is loaded
 
</LI>
 
<LI>In the GRASS toolbar, click on the
 
  grass_new_mapsetNew mapset icon to bring up the
 
  MAPSET wizard.
 
</LI>
 
<LI>Select the GRASS database (GISDBASE) folder grassdata
 
  with the LOCATION alaska, where we want to add a further
 
  MAPSET, called test.
 
</LI>
 
<LI>Click Next.
 
</LI>
 
<LI>We can use this wizard to create a new MAPSET within an
 
  existing LOCATION or to create a new LOCATION
 
  altogether. Click on the radio button Select location
 
  (see Figure <A HREF="node5.html#fig:create_grass_location">28</A>) and click Next.
 
</LI>
 
<LI>Enter the name text for the new MAPSET. Below
 
  in the wizard you see a list of existing MAPSETs and its owners.
 
</LI>
 
<LI>Click Next, check out the summary to make sure it's all
 
  correct and click Finish
 
</LI>
 
</OL>
 
 
<P>
 
 
 
<H2>
 
Importing data into a GRASS LOCATION
 
</H2>
 
 
<P>
 
 
This Section gives an example how to import raster and vector data into the  
 
This Section gives an example how to import raster and vector data into the  
alaska GRASS LOCATION provided by the QGIS alaska  
+
{{Template:FileName|alaska}} GRASS {{Template:FileName|LOCATION}} provided by the QGIS alaska  
dataset. Therefore we use a landcover raster map landcover.img  
+
dataset. Therefore we use a landcover raster map {{Template:FileName|landcover.img}}
and a vector GML File lakes.gml from the QGIS alaska  
+
and a vector GML File {{Template:FileName|lakes.gml}} from the QGIS alaska  
dataset [[#label_sampledata]]</A>.
+
dataset [[label_sampledata]].
  
<P>
+
<ol>
 
+
  <li>Start QGIS and make sure the GRASS plugin is loaded.
<OL>
+
  <li>In the GRASS toolbar, click the {{Template:ToolBtnTwo|grass_open_mapset|Open
<LI>Start QGIS and make sure the GRASS plugin is loaded.
+
   MAPSET}} icon to bring up the {{Template:FileName|MAPSET}} wizard.
</LI>
+
  <li>Select as GRASS database the folder {{Template:FileName|grassdata}} in the QGIS  
<LI>In the GRASS toolbar, click the grass_open_mapsetOpen
+
   alaska dataset, as {{Template:FileName|LOCATION alaska}}, as {{Template:FileName|MAPSET}}
   MAPSET icon to bring up the MAPSET wizard.
+
   {{Template:FileName|demo}} and click {{Template:Button|OK}}.
</LI>
+
  <li>Now click the {{Template:ToolBtnTwo|grass_tools|Open GRASS tools}} icon. The  
<LI>Select as GRASS database the folder grassdata in the QGIS  
+
   GRASS Toolbox (see Section [[#subsec:grass_toolbox|9.9]]) dialog appears.
   alaska dataset, as LOCATION alaska, as MAPSET  
+
  <li>To import the raster map {{Template:FileName|landcover.img}}, click the module  
   demo and click OK.
+
   {{Template:FileName|r.in.gdal}} in the {{Template:Tab|Modules Tree}} tab. This GRASS module  
</LI>
+
<LI>Now click the grass_toolsOpen GRASS tools icon. The  
+
   GRASS Toolbox (see Section [[node12.html#subsec:grass_toolbox|9.9]]) dialog appears.
+
</LI>
+
<LI>To import the raster map landcover.img, click the module  
+
   r.in.gdal in the Modules Tree tab. This GRASS module  
+
 
   allows to import GDAL supported raster files into a GRASS  
 
   allows to import GDAL supported raster files into a GRASS  
   LOCATION. The module dialog for r.in.gdal appears.
+
   {{Template:FileName|LOCATION}}. The module dialog for {{Template:FileName|r.in.gdal}} appears.
</LI>
+
  <li>Browse to the folder {{Template:FileName|raster}} in the QGIS alaska dataset  
<LI>Browse to the folder raster in the QGIS alaska dataset  
+
   and select the file {{Template:FileName|landcover.img}}.
   and select the file landcover.img.
+
  <li>As raster output name define {{Template:FileName|landcover_grass}} and click  
</LI>
+
   {{Template:Button|Run}}. In the {{Template:Tab|Output}} tab you see the currently running GRASS  
<LI>As raster output name define landcover_grass and click  
+
   command {{Template:FileName|1=r.in.gdal -o input=/path/to/landcover.img  
   Run. In the Output tab you see the currently running GRASS  
+
   output=landcover_grass}}.
   command r.in.gdal -o input=/path/to/landcover.img  
+
  <li>When it says '''Succesfully finished''' click {{Template:Button|View output}}.  
   output=landcover_grass.
+
   The {{Template:FileName|landcover_grass}} raster layer is now imported into GRASS and  
</LI>
+
<LI>When it says <SPAN  CLASS="textbf">Succesfully finished</SPAN> click View output.  
+
   The landcover_grass raster layer is now imported into GRASS and  
+
 
   will be visualized in the QGIS canvas.
 
   will be visualized in the QGIS canvas.
</LI>
+
  <li>To import the vector GML file {{Template:FileName|lakes.gml}}, click the module  
<LI>To import the vector GML file lakes.gml, click the module  
+
   {{Template:FileName|v.in.ogr}} in the {{Template:Tab|Modules Tree}} tab. This GRASS module allows  
   v.in.ogr in the Modules Tree tab. This GRASS module allows  
+
   to import OGR supported vector files into a GRASS {{Template:FileName|LOCATION}}. The  
   to import OGR supported vector files into a GRASS LOCATION. The  
+
   module dialog for {{Template:FileName|v.in.ogr}} appears.
   module dialog for v.in.ogr appears.
+
  <li>Browse to the folder {{Template:FileName|gml}} in the QGIS alaska  
</LI>
+
   dataset and select the file {{Template:FileName|lakes.gml}} as OGR file.
<LI>Browse to the folder gml in the QGIS alaska  
+
  <li>As vector output name define {{Template:FileName|lakes_grass}} and click  
   dataset and select the file lakes.gml as OGR file.
+
   {{Template:Button|Run}}. You don't have to care about the other options in this  
</LI>
+
   example. In the {{Template:Tab|Output}} tab you see the currently running GRASS  
<LI>As vector output name define lakes_grass and click  
+
   command {{Template:FileName|1=v.in.ogr -o dsn=/path/to/lakes.gml output=lakes_grass}}.
   Run. You don't have to care about the other options in this  
+
  <li>When it says '''Succesfully finished''' click {{Template:Button|View output}}.  
   example. In the Output tab you see the currently running GRASS  
+
   The {{Template:FileName|lakes_grass}} vector layer is now imported into GRASS and will  
   command v.in.ogr -o dsn=/path/to/lakes.gml output=lakes_grass.
+
</LI>
+
<LI>When it says <SPAN  CLASS="textbf">Succesfully finished</SPAN> click View output.  
+
   The lakes_grass vector layer is now imported into GRASS and will  
+
 
   be visualized in the QGIS canvas.  
 
   be visualized in the QGIS canvas.  
</LI>
+
</ol>
</OL>
+
 
+
<P>
+
  
<H2>
+
=== GRASSベクターデータモデル ===
The GRASS vector data model
+
<span id='label_vectmodel'></span>
</H2>
+
  
<P>
 
 
It is important to understand the GRASS vector data model prior to
 
It is important to understand the GRASS vector data model prior to
digitizing.<A NAME="240"></A> In general, GRASS uses a topological
+
digitizing. In general, GRASS uses a topological
vector model.<A NAME="241"></A> This means that areas are not represented
+
vector model. This means that areas are not represented
 
as closed polygons, but by one or more boundaries. A boundary between two
 
as closed polygons, but by one or more boundaries. A boundary between two
 
adjacent areas is digitized only once, and it is shared by both areas.
 
adjacent areas is digitized only once, and it is shared by both areas.
行425: 行275:
 
by the centroid of the area.
 
by the centroid of the area.
  
<P>
 
 
Besides boundaries and centroids, a vector map can also contain
 
Besides boundaries and centroids, a vector map can also contain
 
points and lines. All these geometry elements can be mixed
 
points and lines. All these geometry elements can be mixed
行431: 行280:
 
one GRASS vector map. So in GRASS a layer is not a vector or raster map but a
 
one GRASS vector map. So in GRASS a layer is not a vector or raster map but a
 
level inside a vector layer. This is important to distinguish carefully.
 
level inside a vector layer. This is important to distinguish carefully.
[[footnode.html#foot242]]
+
<ref>Although it
<P>
+
is possible to mix geometry elements, it is unusual and even in GRASS only
 +
used in special cases such as vector network analysis. Normally you should
 +
prefere to store different geometry elements in different layers.</ref>
 
It is possible to store more 'layers' in one vector dataset. For example,
 
It is possible to store more 'layers' in one vector dataset. For example,
 
fields, forests and lakes can be stored in one vector. Adjacent
 
fields, forests and lakes can be stored in one vector. Adjacent
行439: 行290:
 
the boundary between lake and forest is a road, so it can have a different  
 
the boundary between lake and forest is a road, so it can have a different  
 
attribute table.
 
attribute table.
 
+
<P>
+
 
The 'layer' of the feature is defined by 'layer' inside GRASS. 'Layer' is the  
 
The 'layer' of the feature is defined by 'layer' inside GRASS. 'Layer' is the  
 
number which defines if there are more than one layer inside the dataset, e.g.  
 
number which defines if there are more than one layer inside the dataset, e.g.  
行446: 行296:
 
future GRASS will also support names as fields in the user interface.
 
future GRASS will also support names as fields in the user interface.
  
<P>
+
Attributes can be stored inside the GRASS {{Template:FileName|LOCATION}} as DBase or  
Attributes can be stored inside the GRASS LOCATION as DBase or  
+
 
SQLITE3 or in external database tables, for example PostgreSQL, MySQL,  
 
SQLITE3 or in external database tables, for example PostgreSQL, MySQL,  
Oracle, etc.<A NAME="244"></A>
+
Oracle, etc.
  
<P>
 
 
Attributes in database tables are linked to geometry elements using
 
Attributes in database tables are linked to geometry elements using
a 'category' value.<A NAME="245"></A> 'Category' (key, ID) is an
+
a 'category' value. 'Category' (key, ID) is an
 
integer attached to geometry primitives, and it is used as the link to one
 
integer attached to geometry primitives, and it is used as the link to one
 
key column in the database table.
 
key column in the database table.
  
 +
{{Template:Tip
 +
|num=35
 +
|caption=Learning the GRASS Vector Model
 +
|qgistip=
 +
The best way to learn the GRASS vector model and its capabilities is to
 +
download one of the many GRASS tutorials where the vector model is described
 +
more deeply. See {{Template:URL|http://grass.osgeo.org/gdp/manuals.php}} for more
 +
information, books and tutorials in several languages.
 +
}}
  
<BR>
+
=== 新規GRASSベクターレイヤを作る ===
 
+
<span id='sec:creating_new_grass_vectors'></span>
<P>
+
 
+
<H2>
+
Creating a new GRASS vector layer
+
</H2><A NAME="490"></A>
+
  
<br>
 
 
To create a new GRASS vector layer with the GRASS plugin click the  
 
To create a new GRASS vector layer with the GRASS plugin click the  
grass_new_vector_layerCreate new GRASS vector toolbar icon.  
+
{{Template:ToolBtnTwo|grass_new_vector_layer|Create new GRASS vector}} toolbar icon.  
 
Enter a name in the text box and you can start digitizing point, line or  
 
Enter a name in the text box and you can start digitizing point, line or  
polygone geometries, following the procedure described in Section [[node10.html#grass_digitising|9.7]].  
+
polygone geometries, following the procedure described in Section  
 +
[[#grass_digitising|9.7]].  
  
<br>
 
 
In GRASS it is possible to organize all sort of geometry types (point, line  
 
In GRASS it is possible to organize all sort of geometry types (point, line  
 
and area) in one layer, because GRASS uses a topological vector model, so you  
 
and area) in one layer, because GRASS uses a topological vector model, so you  
 
don't need to select the geometry type when creating a new GRASS vector. This  
 
don't need to select the geometry type when creating a new GRASS vector. This  
 
is different from Shapefile creation with QGIS, because Shapefiles use the  
 
is different from Shapefile creation with QGIS, because Shapefiles use the  
Simple Feature vector model (see Section [[#sec:create_shape]]).
+
Simple Feature vector model (see Section [[sec:create shape]]).
  
<P>
+
{{Template:Tip
<BR>
+
|num=36
 +
|caption=Creating an attribute table for a new GRASS vector layer
 +
|qgistip=
 +
If you want to assign attributes to your digitized geometry features, make sure to create an attribute table with columns before you start digitizing (see Figure [[#fig:grass_digitizing_table|31]]).
 +
}}
  
<H2>
+
=== GRASSベクターレイヤのデジタイズと編集 ===
Digitizing and editing a GRASS vector layer
+
<span id='grass_digitising'></span>
</H2>
+
  
<P>
 
 
The digitizing tools for GRASS vector layers are accessed using the
 
The digitizing tools for GRASS vector layers are accessed using the
grass_editEdit GRASS vector layer icon on the toolbar. Make  
+
{{Template:ToolBtnTwo|grass_edit|Edit GRASS vector layer}} icon on the toolbar. Make  
 
sure you have loaded a GRASS vector and it is the selected layer in the legend  
 
sure you have loaded a GRASS vector and it is the selected layer in the legend  
before clicking on the edit tool. Figure <A HREF="#fig:grass_digitizing_category">30</A>
+
before clicking on the edit tool. Figure [[#fig:grass_digitizing_category|28]]
 
shows the GRASS edit dialog that is displayed when you click on the edit tool.  
 
shows the GRASS edit dialog that is displayed when you click on the edit tool.  
 
The tools and settings are discussed in the following sections.
 
The tools and settings are discussed in the following sections.
  
<P>
+
{{Template:Tip
<BR>
+
|num=37
<IMG
+
|caption=Digitizing polygones in GRASS
WIDTH="500" HEIGHT="11" ALIGN="BOTTOM" BORDER="0"
+
|qgistip=
SRC="img4.png"
+
If you want to create a polygone in GRASS, you first digitize the boundary of
ALT="\begin{Tip}
+
the polygone, setting the mode to {{Template:UserText|No category}}. Then you add a
% latex2html id marker 267
+
centroid (label point) into the closed boundary, setting the mode to
\caption{\textsc{Digitizing polygones in ...
+
{{Template:UserText|Next not used}}. The reason is, that a topological vector model links
...mation of a polygon always to the centroid and not to the
+
attribute information of a polygon always to the centroid and not to the  
 
boundary.
 
boundary.
}
+
}}  
\end{Tip}">
+
<BR>
+
  
<P>
+
===== Toolbar =====
Toolbar<A NAME="label_grasstoolbar"></A>
+
<span id='label_grasstoolbar'></span>
<P>
+
In Figure [[#fig:grass_digitizing_toolbar|27]] you see the GRASS digitizing
In Figure <A HREF="#fig:grass_digitizing_toolbar">29</A> you see the GRASS digitizing
+
toolbar icons provided by the GRASS plugin. Table [[tab:grass_tools]]
toolbar icons provided by the GRASS plugin. Table <A HREF="#tab:grass_tools">3</A>
+
 
explains the available functionalities.
 
explains the available functionalities.
  
<P>
+
<table align='center'>
 +
<caption>'''図 27:''' GRASS Digitizing Toolbar {{Template:Nix}}</caption>
 +
<tr><td><span id='fig:grass_digitizing_toolbar'></span>
 +
  [[File:grass_digitizing_toolbar.png|454px]]</td></tr></table>
  
<DIV ALIGN="CENTER"><A NAME="fig:grass_digitizing_toolbar"></A><A NAME="278"></A>
+
<table border='1' align='center'><caption>'''表 3:''' GRASS Digitizing Tools</caption><span id='tab:grass_tools'></span>
<TABLE>
+
<!-- {|l|l|p{5in}|} -->
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
<tr><td> '''Icon''' <td> '''Tool''' <td width='480'> '''Purpose''' </tr>
GRASS Digitizing Toolbar </CAPTION>
+
<tr><td> [[File:grass_new_point.png|26px]] <td> New Point <td> Digitize
<TR><TD>
+
new point </tr>
<DIV ALIGN="CENTER">
+
<tr><td> [[File:grass_new_line.png|26px]] <td> New Line <td> Digitize
  [clip=true,width=12cm]grass_digitizing_toolbar
+
new line (finish by selecting new tool) </tr>
 +
<tr><td> [[File:grass_new_boundary.png|26px]] <td> New Boundary <td>
 +
Digitize new boundary (finish by selecting new tool)</tr>
 +
<tr><td> [[File:grass_new_centroid.png|26px]] <td> New Centroid <td>
 +
Digitize new centroid (label existing area)</tr>
 +
<tr><td> [[File:grass_move_vertex.png|26px]] <td> Move vertex <td> Move
 +
one vertex of existing line or boundary and identify new position</tr>
 +
<tr><td> [[File:grass_add_vertex.png|26px]] <td> Add vertex <td> Add a
 +
new vertex to existing line</tr>
 +
<tr><td> [[File:grass_delete_vertex.png|26px]] <td> Delete vertex <td>
 +
Delete vertex from existing line (confirm selected vertex by another click)</tr>
 +
<tr><td> [[File:grass_move_line.png|26px]] <td> Move element <td> Move
 +
selected boundary, line, point or centroid and click on new position</tr>
 +
<tr><td> [[File:grass_split_line.png|26px]] <td> Split line <td> Split
 +
an existing line to 2 parts</tr>
 +
<tr><td> [[File:grass_delete_line.png|26px]] <td> Delete element <td>
 +
Delete existing boundary, line, point or centroid (confirm selected element by
 +
another click)</tr>
 +
<tr><td> [[File:grass_edit_attributes.png|26px]] <td> Edit attributes
 +
<td> Edit attributes of selected element (note that one element can represent
 +
more features, see above)</tr>
 +
<tr><td> [[File:grass_close_edit.png|26px]] <td> Close <td> Close
 +
session and save current status (rebuilds topology afterwards)</tr>
 +
</table>
  
</DIV></TD></TR>
+
===== Category Tab =====
</TABLE>
+
</DIV>
+
  
<P>
+
The {{Template:Tab|Category}} tab allows you to define the way in which the category  
<BR><P></P>
+
<DIV ALIGN="CENTER">
+
<A NAME="284"></A>
+
<DIV ALIGN="CENTER">
+
 
+
</DIV><A NAME="tab:grass_tools"></A><P>
+
<BR>
+
<A NAME="285"></A>
+
<TABLE CELLPADDING=3 BORDER="1">
+
<CAPTION><STRONG>Table 3:</STRONG>
+
GRASS Digitizing Tools</CAPTION>
+
<TR><TH ALIGN="LEFT"><SPAN  CLASS="textbf">Icon</SPAN></TH>
+
<TH ALIGN="LEFT"><SPAN  CLASS="textbf">Tool</SPAN></TH>
+
<TH ALIGN="LEFT" VALIGN="TOP" WIDTH=360><SPAN  CLASS="textbf">Purpose</SPAN></TH>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_new_point</TD>
+
<TD ALIGN="LEFT">New Point</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Digitize
+
new point</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_new_line</TD>
+
<TD ALIGN="LEFT">New Line</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Digitize
+
new line (finish by selecting new tool)</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_new_boundary</TD>
+
<TD ALIGN="LEFT">New Boundary</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Digitize new boundary (finish by selecting new tool)</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_new_centroid</TD>
+
<TD ALIGN="LEFT">New Centroid</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Digitize new centroid (label existing area)</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_move_vertex</TD>
+
<TD ALIGN="LEFT">Move vertex</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Move
+
one vertex of existing line or boundary and identify new position</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_add_vertex</TD>
+
<TD ALIGN="LEFT">Add vertex</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Add a
+
new vertex to existing line</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_delete_vertex</TD>
+
<TD ALIGN="LEFT">Delete vertex</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Delete vertex from existing line (confirm selected vertex by another click)</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_move_line</TD>
+
<TD ALIGN="LEFT">Move element</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Move
+
selected boundary, line, point or centroid and click on new position</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_split_line</TD>
+
<TD ALIGN="LEFT">Split line</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Split
+
an existing line to 2 parts</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_delete_line</TD>
+
<TD ALIGN="LEFT">Delete element</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Delete existing boundary, line, point or centroid (confirm selected element by
+
another click)</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_edit_attributes</TD>
+
<TD ALIGN="LEFT">Edit attributes</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Edit attributes of selected element (note that one element can represent
+
more features, see above)</TD>
+
</TR>
+
<TR><TD ALIGN="LEFT">[width=0.7cm]grass_close_edit</TD>
+
<TD ALIGN="LEFT">Close</TD>
+
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH=360>Close
+
session and save current status (rebuilds topology afterwards)</TD>
+
</TR>
+
</TABLE>
+
</DIV>
+
<BR>
+
 
+
<P>
+
Category Tab<A NAME="307"></A>
+
 
+
<P>
+
The Category tab allows you to define the way in which the category  
+
 
values will be assigned to a new geometry element.
 
values will be assigned to a new geometry element.
  
<P>
+
<table align='center'>
 +
<caption>'''図 28:''' GRASS Digitizing Category Tab {{Template:Nix}}</caption>
 +
<tr><td><span id='fig:grass_digitizing_category'></span>
 +
  [[File:grass_digitizing_category.png|378px]]</td></tr></table>
  
<DIV ALIGN="CENTER"><A NAME="fig:grass_digitizing_category"></A><A NAME="311"></A>
+
<ul>
<TABLE>
+
<li>'''Mode''': what category value shall be applied to new geometry  
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
GRASS Digitizing Category Tab </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
  [clip=true,width=10cm]grass_digitizing_category
+
+
</DIV></TD></TR>
+
</TABLE>
+
</DIV>
+
 
+
<P>
+
 
+
<UL>
+
<LI><SPAN  CLASS="textbf">Mode</SPAN>: what category value shall be applied to new geometry  
+
 
elements.
 
elements.
 
+
<ul>
<UL>
+
<li>Next not used - apply next not yet used category value to geometry
<LI>Next not used - apply next not yet used category value to geometry
+
 
element.
 
element.
</LI>
+
<li>Manual entry - manually define the category value for the geometry
<LI>Manual entry - manually define the category value for the geometry
+
 
element in the 'Category'-entry field.
 
element in the 'Category'-entry field.
</LI>
+
<li>No category - Do not apply a category value to the geometry element.
<LI>No category - Do not apply a category value to the geometry element.
+
 
This is e.g. used for area boundaries, because the category values are
 
This is e.g. used for area boundaries, because the category values are
 
connected via the centroid.
 
connected via the centroid.
</LI>
+
</ul>
</UL>
+
<li>'''Category''' - A number (ID) is attached to each digitized geometry
</LI>
+
<LI><SPAN  CLASS="textbf">Category</SPAN> - A number (ID) is attached to each digitized geometry
+
 
element. It is used to connect each geometry element with its attributes.
 
element. It is used to connect each geometry element with its attributes.
</LI>
+
<li>'''Field (layer)''' - Each geometry element can be connected with
<LI><SPAN  CLASS="textbf">Field (layer)</SPAN> - Each geometry element can be connected with
+
 
several attribute tables using different GRASS geometry layers. Default layer
 
several attribute tables using different GRASS geometry layers. Default layer
 
number is 1.  
 
number is 1.  
</LI>
+
</ul>
</UL>
+
  
<P>
+
{{Template:Tip
<BR>
+
|num=38
<IMG
+
|caption=Creating an additional GRASS 'layer' with QGIS
WIDTH="251" HEIGHT="11" ALIGN="BOTTOM" BORDER="0"
+
|qgistip=If you would like to add more layers to your dataset, just add a new
SRC="img5.png"
+
number in the 'Field (layer)' entry box and press return. In the Table tab
ALT="\begin{Tip}
+
% latex2html id marker 323
+
\caption{\textsc{Creating an additional G...
+
...Table tab
+
 
you can create your new table connected to your new layer.
 
you can create your new table connected to your new layer.
}
+
}}
\end{Tip}">
+
<BR>
+
  
<P>
+
iGHqQh  <a href="http://zisjffcaxfrn.com/">zisjffcaxfrn</a>, [url=http://ixkftjhassls.com/]ixkftjhassls[/url], [link=http://ucoizyulyikc.com/]ucoizyulyikc[/link], http://haenqpzehhsi.com/
Settings Tab<A NAME="label_settingtab"></A><A NAME="329"></A>
+
  
<P>
+
http://bestcigarettesnow.com/ newport red coupons,
The Settings tab allows you to set the snapping in screen pixels. The
+
threshold defines at what distance new points or line ends are snapped to
+
existing nodes. This helps to prevent gaps or dangles between boundaries. The
+
default is set to 10 pixels.
+
  
<P>
+
http://slforum.novacartoons.com/index.php?topic=54350.new#4986 buy retin-a,
  
<DIV ALIGN="CENTER"><A NAME="fig:grass_digitizing_settings"></A><A NAME="333"></A>
+
=== GRASS region ツール ===
<TABLE>
+
<span id='sec:grass_region'></span>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
GRASS Digitizing Settings Tab </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
[clip=true,width=8cm]grass_digitizing_settings
+
+
</DIV></TD></TR>
+
</TABLE>
+
</DIV>
+
 
+
<P>
+
Symbology Tab<A NAME="339"></A>
+
 
+
<P>
+
The Symbology tab allows you to view and set symbology and color
+
settings for various geometry types and their topological status (e.g. closed
+
/ opened boundary).
+
 
+
<P>
+
 
+
<DIV ALIGN="CENTER"><A NAME="fig:grass_digitizing_symbology"></A><A NAME="343"></A>
+
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
GRASS Digitizing Symbolog Tab </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
[clip=true,width=8cm]grass_digitizing_symbology
+
+
</DIV></TD></TR>
+
</TABLE>
+
</DIV>
+
 
+
<P>
+
Table Tab <A NAME="349"></A>
+
 
+
<P>
+
The Table tab provides information about the database table for
+
a given 'layer'. Here you can add new columns to an existing attribute table,
+
or create a new database table for a new GRASS vector layer (see Section
+
<A HREF="node9.html#sec:creating_new_grass_vectors">9.6</A>).
+
 
+
<P>
+
 
+
<DIV ALIGN="CENTER"><A NAME="fig:grass_digitizing_table"></A><A NAME="354"></A>
+
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
GRASS Digitizing Table Tab </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
[clip=true,width=10cm]grass_digitizing_table
+
+
</DIV></TD></TR>
+
</TABLE>
+
</DIV>
+
 
+
 
+
<BR>
+
 
+
<P>
+
 
+
<H2>
+
The GRASS region tool
+
</H2>
+
  
<P>
 
 
The region definition (setting a spatial working window) in GRASS is important  
 
The region definition (setting a spatial working window) in GRASS is important  
 
for working with raster layers. Vector analysis is per default not limited
 
for working with raster layers. Vector analysis is per default not limited
行752: 行452:
 
spatial extension and resolution of the currently defined GRASS region,
 
spatial extension and resolution of the currently defined GRASS region,
 
regardless of their original extension and resolution. The current GRASS
 
regardless of their original extension and resolution. The current GRASS
region is stored in the $LOCATION/$MAPSET/WIND file, and it  
+
region is stored in the {{Template:FileName|$LOCATION/$MAPSET/WIND}} file, and it  
 
defines north, south, east and west bounds, number of columns and rows,  
 
defines north, south, east and west bounds, number of columns and rows,  
 
horizontal and vertical spatial resolution.
 
horizontal and vertical spatial resolution.
<br>
+
 
<br>
+
 
It is possible to switch on/off the visualization of the GRASS region in the
 
It is possible to switch on/off the visualization of the GRASS region in the
QGIS canvas using the grass_regionDisplay current GRASS region
+
QGIS canvas using the {{Template:ToolBtnTwo|grass_region|Display current GRASS region}}
button. <A NAME="371"></A>.
+
button. .
<br>
+
 
<br>
+
With the {{Template:ToolBtnTwo|grass_region_edit|Edit current GRASS region}} icon you  
With the grass_region_editEdit current GRASS region icon you  
+
 
can open a dialog to change the current region and the symbology of the GRASS  
 
can open a dialog to change the current region and the symbology of the GRASS  
 
region rectangle in the QGIS canvas. Type in the new region bounds and  
 
region rectangle in the QGIS canvas. Type in the new region bounds and  
resolution and click OK. It also allows to select a new region  
+
resolution and click {{Template:Button|OK}}. It also allows to select a new region  
 
interactively with your mouse on the QGIS canvas. Therefore click with the  
 
interactively with your mouse on the QGIS canvas. Therefore click with the  
 
left mouse button in the QGIS canvas, open a rectangle, close it using the  
 
left mouse button in the QGIS canvas, open a rectangle, close it using the  
left mouse button again and click OK.<A NAME="376"></A>
+
left mouse button again and click {{Template:Button|OK}}.
The GRASS module g.region provide a lot more parameters to define  
+
The GRASS module {{Template:FileName|g.region}} provide a lot more parameters to define  
 
an appropriate region extend and resolution for your raster analysis. You can  
 
an appropriate region extend and resolution for your raster analysis. You can  
 
use these parameters with the GRASS Toolbox, described in Section  
 
use these parameters with the GRASS Toolbox, described in Section  
[[node12.html#subsec:grass_toolbox|9.9]].
+
[[#subsec:grass_toolbox|9.9]].
 
+
<P>
+
  
<H2>
+
=== GRASSツールボックス ===
The GRASS toolbox
+
<span id='subsec:grass_toolbox'></span>
</H2>
+
  
<P>
+
The {{Template:ToolBtnTwo|grass_tools|Open GRASS Tools}} box provides GRASS module  
The grass_toolsOpen GRASS Tools box provides GRASS module  
+
functionalities to work with data inside a selected GRASS {{Template:FileName|LOCATION}}
functionalities to work with data inside a selected GRASS LOCATION  
+
and {{Template:FileName|MAPSET}}. To use the GRASS toolbox you need to open a  
and MAPSET. To use the GRASS toolbox you need to open a  
+
{{Template:FileName|LOCATION}} and {{Template:FileName|MAPSET}} where you have write-permission  
LOCATION and MAPSET where you have write-permission  
+
(usually granted, if you created the {{Template:FileName|MAPSET}}). This is necessary,  
(usually granted, if you created the MAPSET). This is necessary,  
+
 
because new raster or vector layers created during analysis need to be written  
 
because new raster or vector layers created during analysis need to be written  
to the currently selected LOCATION and MAPSET.
+
to the currently selected {{Template:FileName|LOCATION}} and {{Template:FileName|MAPSET}}.
  
<P>
+
==== Working with GRASS modules ====
<BR><HR>
+
<!--Table of Child-Links-->
+
<STRONG>Subsections</STRONG>
+
  
<UL CLASS="ChildLinks">
+
<table align='center'>
<LI>[[Working with GRASS modules]]
+
<caption>'''図 32:''' GRASS Toolbox and searchable Modules List {{Template:Nix}}</caption>
<LI>[[Working with the GRASS LOCATION browser]]
+
<tr><td><span id='fig:grass_modules'></span>
<LI>[[Customizing the GRASS Toolbox]]
+
  <table align='center'><caption align='bottom'>(a) Modules Tree</caption><tr><td><span id='subfig:grass_module_tree'></span>[[File:grass_toolbox_moduletree.png|296px]]</td></tr></table>
</UL>
+
  <table align='center'><caption align='bottom'>(b) Searchable Modules List</caption><tr><td><span id='subfig:grass_module_list'></span>[[File:grass_toolbox_modulelist.png|296px]]</td></tr></table>
<!--End of Table of Child-Links-->
+
</td></tr></table>
<BR><HR>
+
  
<H3>
 
Working with GRASS modules
 
</H3>
 
 
<P>
 
 
<DIV ALIGN="CENTER"><A NAME="fig:grass_modules"></A><A NAME="subfig:grass_module_tree"></A><A NAME="subfig:grass_module_list"></A><A NAME="394"></A>
 
<TABLE>
 
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
 
GRASS Toolbox and searchable Modules List </CAPTION>
 
<TR><TD>
 
<DIV ALIGN="CENTER">
 
 
</DIV>  [Modules Tree] [clip=true, width=0.4]grass_toolbox_moduletree
 
  [Searchable Modules List] [clip=true, width=0.4]grass_toolbox_modulelist</TD></TR>
 
</TABLE>
 
</DIV>
 
 
<P>
 
 
The GRASS Shell inside the GRASS Toolbox provides access to almost all (more  
 
The GRASS Shell inside the GRASS Toolbox provides access to almost all (more  
 
than 300) GRASS modules in command line modus. To offer a more user
 
than 300) GRASS modules in command line modus. To offer a more user
行826: 行497:
 
functionalities are also provided by graphical dialogs. These dialogs are  
 
functionalities are also provided by graphical dialogs. These dialogs are  
 
grouped in thematic blocks, but are searchable as well. You find a complete  
 
grouped in thematic blocks, but are searchable as well. You find a complete  
list of GRASS modules available in QGIS version  
+
list of GRASS modules available in QGIS version \CURRENT
in appendix [[#appdx_grass_toolbox_modules]]. It is also possible to  
+
in appendix [[appdx_grass_toolbox_modules]]. It is also possible to  
 
customize the GRASS Toolbox content. It is described in Section  
 
customize the GRASS Toolbox content. It is described in Section  
<A HREF="node15.html#sec:toolbox-customizing">9.9.3</A>.
+
[[sec:toolbox-customizing]].
  
<br><br>
+
As shown in Figure [[#fig:grass_modules|32]], you can look for the appropriate  
As shown in Figure <A HREF="#fig:grass_modules">34</A>, you can look for the appropriate  
+
GRASS module using the thematically grouped {{Template:Tab|Modules Tree}} or the  
GRASS module using the thematically grouped Modules Tree or the  
+
searchable {{Template:Tab|Modules List}} tab.  
searchable Modules List tab.  
+
  
<br><br>
 
 
Clicking on a grapical module icon a new tab will be added to the toolbox  
 
Clicking on a grapical module icon a new tab will be added to the toolbox  
dialog providing three new sub-tabs Options, Output and  
+
dialog providing three new sub-tabs {{Template:Tab|Options}}, {{Template:Tab|Output}} and  
Manual. In Figure <A HREF="#fig:grass_module_dialog">35</A> you see an example  
+
{{Template:Tab|Manual}}. In Figure [[#fig:grass_module_dialog|33]] you see an example  
for the GRASS module v.buffer.
+
for the GRASS module {{Template:FileName|v.buffer}}.
 
+
<br><br>
+
 
+
<DIV ALIGN="CENTER"><A NAME="fig:grass_module_dialog"></A><A NAME="subfig:grass_module_option"></A><A NAME="subfig:grass_module_output"></A><A NAME="subfig:grass_module_manual"></A><A NAME="412"></A>
+
<TABLE>
+
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
GRASS Toolbox Module Dialogs </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
  
</DIV>   [Module Options] [clip=true, width=0.3]grass_module_option [Modules Output] [clip=true, width=0.3]grass_module_output [Module Manual] [clip=true, width=0.3]grass_module_manual</TD></TR>
+
<table align='center'>
</TABLE>
+
<caption>'''図 33:''' GRASS Toolbox Module Dialogs {{Template:Nix}}</caption>
</DIV>
+
<tr><td><span id='fig:grass_module_dialog'></span>
 +
  <table align='center'><caption align='bottom'>(a) Module Options</caption><tr><td><span id='subfig:grass_module_option'></span>[[File:grass_module_option.png|222px]]</td></tr></table>
 +
  <table align='center'><caption align='bottom'>(b) Modules Output</caption><tr><td><span id='subfig:grass_module_output'></span>[[File:grass_module_output.png|222px]]</td></tr></table>
 +
  <table align='center'><caption align='bottom'>(c) Module Manual</caption><tr><td><span id='subfig:grass_module_manual'></span>[[File:grass_module_manual.png|222px]]</td></tr></table>
 +
</td></tr></table>
  
<BR><BR>
+
===== Options =====
Options
+
  
<BR>
+
The {{Template:Tab|Options}} tab provides a simplified module dialog where you can  
The Options tab provides a simplified module dialog where you can  
+
 
usually select a raster or vector layer visualized in the QGIS canvas and  
 
usually select a raster or vector layer visualized in the QGIS canvas and  
 
enter further module specific parameters to run the module. The provided  
 
enter further module specific parameters to run the module. The provided  
行866: 行528:
 
and run the module in the command line.
 
and run the module in the command line.
  
<BR><BR>
+
===== Output =====
Output
+
  
<BR>
+
The {{Template:Tab|Output}} tab provides information about the output status of the  
The Output tab provides information about the output status of the  
+
module. When you click the {{Template:Button|Run}} button, the module switches to the  
module. When you click the Run button, the module switches to the  
+
{{Template:Tab|Output}} tab and you see information about the analysis process. If all  
Output tab and you see information about the analysis process. If all  
+
works well, you will finally see a {{Template:UserText|Successfully finished}} message.
works well, you will finally see a Successfully finished message.
+
  
<BR><BR>
+
===== Manual =====
Manual
+
  
<BR>
+
The {{Template:Tab|Manual}} tab shows the HTML help page of the GRASS module. You can  
The Manual tab shows the HTML help page of the GRASS module. You can  
+
 
use it to check further module parameters and flags or to get a deeper  
 
use it to check further module parameters and flags or to get a deeper  
 
knowledge about the purpose of the module. At the end of each module  
 
knowledge about the purpose of the module. At the end of each module  
manual page you see further links to the Main Help index, the  
+
manual page you see further links to the {{Template:FileName|Main Help index}}, the  
Thematic index and the Full index. These links provide  
+
{{Template:FileName|Thematic index}} and the {{Template:FileName|Full index}}. These links provide  
the same information as if you use the module g.manual  
+
the same information as if you use the module {{Template:FileName|g.manual}}
  
<P>
+
{{Template:Tip
<BR>
+
|num=40
 +
|caption=Display results immediately
 +
|qgistip=If you want to display your calculation results immediately in your
 +
map canvas, you can use the 'View Output' button at the bottom of the
 +
module tab.
  
 +
}}
  
<P>
+
==== Working with the GRASS LOCATION browser ====
 
+
<H3>
+
Working with the GRASS LOCATION browser
+
</H3>
+
 
+
<P>
+
 
Another useful feature inside the GRASS Toolbox is the GRASS  
 
Another useful feature inside the GRASS Toolbox is the GRASS  
LOCATION browser. In Figure&nbsp;<A HREF="#fig:grass_mapset_browser">36</A> you  
+
{{Template:FileName|LOCATION}} browser. In Figure [[#fig:grass_mapset_browser|34]] you  
can see the current working LOCATION with its MAPSETs.
+
can see the current working {{Template:FileName|LOCATION}} with its {{Template:FileName|MAPSETs}}.
  
<P>
+
In the left browser windows you can browse through all {{Template:FileName|MAPSETs}}
In the left browser windows you can browse through all MAPSETs  
+
inside the current {{Template:FileName|LOCATION}}. The right browser window shows some  
inside the current LOCATION. The right browser window shows some  
+
 
meta information for selected raster or vector layers, e.g. resolution,  
 
meta information for selected raster or vector layers, e.g. resolution,  
 
bounding box, data source, connected attribute table for vector data and a  
 
bounding box, data source, connected attribute table for vector data and a  
 
command history.
 
command history.
  
<P>
+
<table align='center'>
 +
<caption>'''図 34:''' GRASS LOCATION browser {{Template:Nix}}</caption>
 +
<tr><td><span id='fig:grass_mapset_browser'></span>
 +
[[File:grass_mapset_browser.png|378px]]</td></tr></table>
  
<DIV ALIGN="CENTER"><A NAME="fig:grass_mapset_browser"></A><A NAME="449"></A>
+
The toolbar inside the {{Template:Tab|Browser}} tab offers following tools to manage
<TABLE>
+
the selected {{Template:FileName|LOCATION}}:
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
+
GRASS LOCATION browser </CAPTION>
+
<TR><TD>
+
<DIV ALIGN="CENTER">
+
[clip=true,width=10cm]grass_mapset_browser
+
+
</DIV></TD></TR>
+
</TABLE>
+
</DIV>
+
  
<P>
+
<ul>
The toolbar inside the Browser tab offers following tools to manage
+
<li>{{Template:ToolBoxTwo|grass_add_map|Add selected map to canvas}}
the selected LOCATION:
+
<li>{{Template:ToolBoxTwo|grass_copy_map|Copy selected map}}
 +
<li>{{Template:ToolBoxTwo|grass_rename_map|Rename selected map}}
 +
<li>{{Template:ToolBoxTwo|grass_delete_map|Delete selected map}}
 +
<li>{{Template:ToolBoxTwo|grass_set_region|Set current region to selected map}}
 +
<li>{{Template:ToolBoxTwo|grass_refresh|Refresh browser window}}
 +
</ul>
  
<P>
+
The {{Template:ToolBoxTwo|grass_rename_map|Rename selected map}} and
 +
{{Template:ToolBoxTwo|grass_delete_map|Delete selected map}} only work with maps inside
 +
your currently selected {{Template:FileName|MAPSET}}. All other tools also work with
 +
raster and vector layers in another {{Template:FileName|MAPSET}}.
  
<UL>
+
==== Customizing the GRASS Toolbox ====
<LI>grass_add_mapAdd selected map to canvas
+
<span id='sec:toolbox-customizing'></span>
</LI>
+
<LI>grass_copy_mapCopy selected map
+
</LI>
+
<LI>grass_rename_mapRename selected map
+
</LI>
+
<LI>grass_delete_mapDelete selected map
+
</LI>
+
<LI>grass_set_regionSet current region to selected map
+
</LI>
+
<LI>grass_refreshRefresh browser window
+
</LI>
+
</UL>
+
  
<P>
 
The grass_rename_mapRename selected map and
 
grass_delete_mapDelete selected map only work with maps inside
 
your currently selected MAPSET. All other tools also work with
 
raster and vector layers in another MAPSET.
 
 
<P>
 
 
<H3>
 
Customizing the GRASS Toolbox
 
</H3>
 
 
<P>
 
 
Nearly all GRASS modules can be added to the GRASS toolbox. A XML  
 
Nearly all GRASS modules can be added to the GRASS toolbox. A XML  
 
interface is provided to parse the pretty simple XML files which configures  
 
interface is provided to parse the pretty simple XML files which configures  
 
the modules appearance and parameters inside the toolbox.
 
the modules appearance and parameters inside the toolbox.
  
<P>
+
A sample XML file for generating the module {{Template:UserText|v.buffer}} (v.buffer.qgm)  
A sample XML file for generating the module v.buffer (v.buffer.qgm)  
+
 
looks like this:
 
looks like this:
<PRE>
+
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+
<?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd"&gt;
+
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
  
&lt;qgisgrassmodule label="Vector buffer" module="v.buffer"&gt;
+
<qgisgrassmodule label="Vector buffer" module="v.buffer">
         &lt;option key="input" typeoption="type" layeroption="layer" /&gt;
+
         <option key="input" typeoption="type" layeroption="layer" />
         &lt;option key="buffer"/&gt;
+
         <option key="buffer"/>
         &lt;option key="output" /&gt;
+
         <option key="output" />
&lt;/qgisgrassmodule&gt;
+
</qgisgrassmodule>
</PRE>
+
</pre>
  
<P>
 
 
The parser reads this definition and creates a new tab inside the toolbox  
 
The parser reads this definition and creates a new tab inside the toolbox  
 
when you select the module. A more detailed description for adding new  
 
when you select the module. A more detailed description for adding new  
modules, changing the modules group, etc. can be found on the QGIS wiki at  
+
modules, changing the modules group, etc. can be found on the QGIS wiki at <br>
<BR>http://wiki.qgis.org/qgiswiki/Adding_New_Tools_to_the_GRASS_Toolbox.
+
{{Template:URL|http://wiki.qgis.org/qgiswiki/Adding_New_Tools_to_the_GRASS_Toolbox}}.
 
+
<P>
+
<BR><HR>
+

2013年9月18日 (水) 12:53時点における最新版

GRASS GISの機能を利用する

The GRASS plugin provides access to GRASS GIS [4] databases and functionalities. This includes visualization of GRASS raster and vector layers, digitizing vector layers, editing vector attributes, creating new vector layers and analysing GRASS 2D and 3D data with more than 300 GRASS modules.

In this Section we'll introduce the plugin functionalities and give some examples on managing and working with GRASS data. Following main features are provided with the toolbar menu, when you start the GRASS plugin, as described in Section 9.1:

  • Grass open mapset.png Open mapset
  • Grass new mapset.png New mapset
  • Grass close mapset.png Close mapset
  • Grass add vector.png Add GRASS vector layer
  • Grass add raster.png Add GRASS raster layer
  • Grass new vector layer.png Create new GRASS vector
  • Grass edit.png Edit GRASS vector layer
  • Grass tools.png Open GRASS tools
  • Grass region.png Display current GRASS region
  • Grass region edit.png Edit current GRASS region

GRASSプラグインを使ってみよう

To use GRASS functionalities and/or visualize GRASS vector and raster layers in QGIS, you must select and load the GRASS plugin with the Plugin Manager. Therefore click the menu Plugins > Manage Plugins, select GRASS and click OK.

You can now start loading raster and vector layers from an existing GRASS LOCATION (see Section 9.2). Or you create a new GRASS LOCATION with QGIS (see Section 9.3.1) and import some raster and vector data (see Section 9.4) for further analysis with the GRASS Toolbox (see Section 9.9).

GRASSラスター、ベクターレイヤをロードする

With the GRASS plugin, you can load vector or raster layers using the appropriate button on the toolbar menu. As an example we use the QGIS alaska dataset (see Section label_sampledata). It includes a small sample GRASS LOCATION with 3 vector layers and 1 raster elevation map.

  1. Create a new folder grassdata, download the QGIS alaska dataset qgis_sample_data.zip from http://download.osgeo.org/qgis/data/ and unzip the file into grassdata.
  2. Start QGIS.
  3. If not already done in a previous QGIS session, load the GRASS plugin clicking on Plugins > Manage Plugins and selecting GRASS. The GRASS toolbar appears on the toolbar menu.
  4. In the GRASS toolbar, click the Grass open mapset.png Open mapset icon to bring up the MAPSET wizard.
  5. For Gisdbase browse and select or enter the path to the newly created folder grassdata.
  6. You should now be able to select the LOCATION alaska and the MAPSET demo.
  7. Click OK. Notice that some previously disabled tools in the GRASS toolbar are now enabled.
  8. Click on Grass add raster.png Add GRASS raster layer, choose the map name gtopo30 and click OK. The elevation layer will be visualized.
  9. Click on Grass add vector.png Add GRASS vector layer, choose the map name alaska and click OK. The alaska boundary vector layer will be overlayed on top of the gtopo30 map. You can now adapt the layer properties as described in chapter sec:vectorprops, e.g. change opacity, fill and outline color.
  10. Also load the other two vector layers rivers and airports and adapt their properties.

As you see, it is very simple to load GRASS raster and vector layers in QGIS. See following Sections for editing GRASS data and creating a new LOCATION. More sample GRASS LOCATIONs are available at the GRASS website at http://grass.osgeo.org/download/data.php .


Tip 34 GRASS Data Loading


If you have problems loading data or QGIS terminates abnormally, check to make sure you have loaded the GRASS plugin properly as described in Section 9.1.



GRASSのLOCATIONとMAPSETについて

GRASS data are stored in a directory referred to as GISDBASE. This directory often called grassdata, must be created before you start working with the GRASS plugin in QGIS. Within this directory, the GRASS GIS data are organized by projects stored in subdirectories called LOCATION. Each LOCATION is defined by its coordinate system, map projection and geographical boundaries. Each LOCATION can have several MAPSETs (subdirectories of the LOCATION) that are used to subdivide the project into different topics, subregions, or as workspaces for individual team members (Neteler & Mitasova 2008 [2]). In order to analyze vector and raster layers with GRASS modules, you must import them into a GRASS LOCATION. <ref>This is not strictly true - with the GRASS modules r.external and v.external you can create read-only links to external GDAL/OGR-supported data sets without importing them. But because this is not the usual way for beginners to work with GRASS, this functionality will not be described here.</ref>

図 25: GRASS data in the alaska LOCATION (adapted from Neteler & Mitasova 2008 [2]
Grass location.png

Creating a new GRASS LOCATION

As an an example you find the instructions how the sample GRASS LOCATION alaska, which is projected in Albers Equal Area projection with unit feet was created for the QGIS sample dataset. This sample GRASS LOCATION alaska will be used for all examples and exercises in the following GRASS GIS related chapters. It is useful to download and install the dataset on your computer label_sampledata).

図 26: Creating a new GRASS LOCATION or a new MAPSET in QGIS Nix.png

Create grass location.png
  1. Start QGIS and make sure the GRASS plugin is loaded
  2. Visualize the alaska.shp Shapefile (see Section sec:load_shapefile) from the QGIS alaska dataset~label_sampledata.
  3. In the GRASS toolbar, click on the Grass open mapset.png Open mapset icon to bring up the MAPSET wizard.
  4. Select an existing GRASS database (GISDBASE) folder grassdata or create one for the new LOCATION using a file manager on your computer. Then click Next.
  5. We can use this wizard to create a new MAPSET within an existing LOCATION (see Section~sec:add_mapset) or to create a new LOCATION altogether. Click on the radio button RadioButtonOn.png Create new location (see Figure 26).
  6. Enter a name for the LOCATION - we used alaska and click Next
  7. Define the projection by clicking on the radio button RadioButtonOn.png Projection to enable the projection list
  8. We are using Albers Equal Area Alaska (feet) projection. Since we happen to know that it is represented by the EPSG ID 2964, we enter it in the search box. (Note: If you want to repeat this process for another LOCATION and projection and haven't memorized the EPSG ID, click on the MIconProjectionEnabled.png projector icon in the lower right-hand corner of the status bar (see Section label_projstart)).
  9. Click Find to select the projection
  10. Click Next
  11. To define the default region, we have to enter the LOCATION bounds in north, south, east, and west direction. Here we simply click on the button Set current QGIS extent, to apply the extend of the loaded layer alaska.shp as the GRASS default region extend.
  12. Click Next
  13. We also need to define a MAPSET within our new LOCATION. You can name it whatever you like - we used demo. <ref>{When creating a new LOCATION, GRASS automatically creates a special MAPSET called PERMANENT designed to store the core data for the project, its default spatial extend and coordinate system definitions (Neteler & Mitasova 2008 [2]).</ref>
  14. Check out the summary to make sure it's correct and click Finish
  15. The new LOCATION alaska and two MAPSETs demo and PERMANENT are created. The currently opened working set is MAPSET demo, as you defined.
  16. Notice that some of the tools in the GRASS toolbar that were disabled are now enabled.

If that seemed like a lot of steps, it's really not all that bad and a very quick way to create a LOCATION. The LOCATION alaska is now ready for data import (see Section 9.4). You can also use the already existing vector and raster data in the sample GRASS LOCATION alaska included in the QGIS alaska dataset label_sampledata and move on to Section 9.5.

Adding a new MAPSET

A user has only write access to a GRASS MAPSET he created. This means, besides access to his own MAPSET, each user can also read maps in other user's MAPSETs, but he can modify or remove only the maps in his own MAPSET. All MAPSETs include a WIND file that stores the current boundary coordinate values and the currently selected raster resolution (Neteler & Mitasova 2008 [2], see Section 9.8).

  1. Start QGIS and make sure the GRASS plugin is loaded
  2. In the GRASS toolbar, click on the Grass new mapset.png New mapset icon to bring up the MAPSET wizard.
  3. Select the GRASS database (GISDBASE) folder grassdata with the LOCATION alaska, where we want to add a further MAPSET, called test.
  4. Click Next.
  5. We can use this wizard to create a new MAPSET within an existing LOCATION or to create a new LOCATION altogether. Click on the radio button RadioButtonOn.png Select location (see Figure 26) and click Next.
  6. Enter the name text for the new MAPSET. Below in the wizard you see a list of existing MAPSETs and its owners.
  7. Click Next, check out the summary to make sure it's all correct and click Finish

GRASS LOCATIONのインポート

This Section gives an example how to import raster and vector data into the alaska GRASS LOCATION provided by the QGIS alaska dataset. Therefore we use a landcover raster map landcover.img and a vector GML File lakes.gml from the QGIS alaska dataset label_sampledata.

  1. Start QGIS and make sure the GRASS plugin is loaded.
  2. In the GRASS toolbar, click the Grass open mapset.png Open MAPSET icon to bring up the MAPSET wizard.
  3. Select as GRASS database the folder grassdata in the QGIS alaska dataset, as LOCATION alaska, as MAPSET demo and click OK.
  4. Now click the Grass tools.png Open GRASS tools icon. The GRASS Toolbox (see Section 9.9) dialog appears.
  5. To import the raster map landcover.img, click the module r.in.gdal in the Modules Tree tab. This GRASS module allows to import GDAL supported raster files into a GRASS LOCATION. The module dialog for r.in.gdal appears.
  6. Browse to the folder raster in the QGIS alaska dataset and select the file landcover.img.
  7. As raster output name define landcover_grass and click Run. In the Output tab you see the currently running GRASS command r.in.gdal -o input=/path/to/landcover.img output=landcover_grass.
  8. When it says Succesfully finished click View output. The landcover_grass raster layer is now imported into GRASS and will be visualized in the QGIS canvas.
  9. To import the vector GML file lakes.gml, click the module v.in.ogr in the Modules Tree tab. This GRASS module allows to import OGR supported vector files into a GRASS LOCATION. The module dialog for v.in.ogr appears.
  10. Browse to the folder gml in the QGIS alaska dataset and select the file lakes.gml as OGR file.
  11. As vector output name define lakes_grass and click Run. You don't have to care about the other options in this example. In the Output tab you see the currently running GRASS command v.in.ogr -o dsn=/path/to/lakes.gml output=lakes_grass.
  12. When it says Succesfully finished click View output. The lakes_grass vector layer is now imported into GRASS and will be visualized in the QGIS canvas.

GRASSベクターデータモデル

It is important to understand the GRASS vector data model prior to digitizing. In general, GRASS uses a topological vector model. This means that areas are not represented as closed polygons, but by one or more boundaries. A boundary between two adjacent areas is digitized only once, and it is shared by both areas. Boundaries must be connected without gaps. An area is identified (labeled) by the centroid of the area.

Besides boundaries and centroids, a vector map can also contain points and lines. All these geometry elements can be mixed in one vector and will be represented in different so called 'layers' inside one GRASS vector map. So in GRASS a layer is not a vector or raster map but a level inside a vector layer. This is important to distinguish carefully. <ref>Although it is possible to mix geometry elements, it is unusual and even in GRASS only used in special cases such as vector network analysis. Normally you should prefere to store different geometry elements in different layers.</ref> It is possible to store more 'layers' in one vector dataset. For example, fields, forests and lakes can be stored in one vector. Adjacent forest and lake can share the same boundary, but they have separate attribute tables. It is also possible to attach attributes to boundaries. For example, the boundary between lake and forest is a road, so it can have a different attribute table.

The 'layer' of the feature is defined by 'layer' inside GRASS. 'Layer' is the number which defines if there are more than one layer inside the dataset, e.g. if the geometry is forest or lake. For now, it can be only a number, in the future GRASS will also support names as fields in the user interface.

Attributes can be stored inside the GRASS LOCATION as DBase or SQLITE3 or in external database tables, for example PostgreSQL, MySQL, Oracle, etc.

Attributes in database tables are linked to geometry elements using a 'category' value. 'Category' (key, ID) is an integer attached to geometry primitives, and it is used as the link to one key column in the database table.


Tip 35 Learning the GRASS Vector Model


The best way to learn the GRASS vector model and its capabilities is to download one of the many GRASS tutorials where the vector model is described more deeply. See http://grass.osgeo.org/gdp/manuals.php for more information, books and tutorials in several languages.



新規GRASSベクターレイヤを作る

To create a new GRASS vector layer with the GRASS plugin click the Grass new vector layer.png Create new GRASS vector toolbar icon. Enter a name in the text box and you can start digitizing point, line or polygone geometries, following the procedure described in Section 9.7.

In GRASS it is possible to organize all sort of geometry types (point, line and area) in one layer, because GRASS uses a topological vector model, so you don't need to select the geometry type when creating a new GRASS vector. This is different from Shapefile creation with QGIS, because Shapefiles use the Simple Feature vector model (see Section sec:create shape).


Tip 36 Creating an attribute table for a new GRASS vector layer


If you want to assign attributes to your digitized geometry features, make sure to create an attribute table with columns before you start digitizing (see Figure 31).



GRASSベクターレイヤのデジタイズと編集

The digitizing tools for GRASS vector layers are accessed using the Grass edit.png Edit GRASS vector layer icon on the toolbar. Make sure you have loaded a GRASS vector and it is the selected layer in the legend before clicking on the edit tool. Figure 28 shows the GRASS edit dialog that is displayed when you click on the edit tool. The tools and settings are discussed in the following sections.


Tip 37 Digitizing polygones in GRASS


If you want to create a polygone in GRASS, you first digitize the boundary of the polygone, setting the mode to No category. Then you add a centroid (label point) into the closed boundary, setting the mode to 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 boundary.



Toolbar

In Figure 27 you see the GRASS digitizing toolbar icons provided by the GRASS plugin. Table tab:grass_tools explains the available functionalities.

図 27: GRASS Digitizing Toolbar Nix.png
Grass digitizing toolbar.png
表 3: GRASS Digitizing Tools
Icon Tool Purpose
Grass new point.png New Point Digitize new point
Grass new line.png New Line Digitize new line (finish by selecting new tool)
Grass new boundary.png New Boundary Digitize new boundary (finish by selecting new tool)
Grass new centroid.png New Centroid Digitize new centroid (label existing area)
Grass move vertex.png Move vertex Move one vertex of existing line or boundary and identify new position
Grass add vertex.png Add vertex Add a new vertex to existing line
Grass delete vertex.png Delete vertex Delete vertex from existing line (confirm selected vertex by another click)
Grass move line.png Move element Move selected boundary, line, point or centroid and click on new position
Grass split line.png Split line Split an existing line to 2 parts
Grass delete line.png Delete element

Delete existing boundary, line, point or centroid (confirm selected element by

another click)
Grass edit attributes.png Edit attributes Edit attributes of selected element (note that one element can represent more features, see above)
Grass close edit.png Close Close session and save current status (rebuilds topology afterwards)
Category Tab

The Category tab allows you to define the way in which the category values will be assigned to a new geometry element.

図 28: GRASS Digitizing Category Tab Nix.png
Grass digitizing category.png
  • Mode: what category value shall be applied to new geometry elements.
    • Next not used - apply next not yet used category value to geometry element.
    • Manual entry - manually define the category value for the geometry element in the 'Category'-entry field.
    • No category - Do not apply a category value to the geometry element. This is e.g. used for area boundaries, because the category values are connected via the centroid.
  • Category - A number (ID) is attached to each digitized geometry element. It is used to connect each geometry element with its attributes.
  • Field (layer) - Each geometry element can be connected with several attribute tables using different GRASS geometry layers. Default layer number is 1.

Tip 38 Creating an additional GRASS 'layer' with QGIS


If you would like to add more layers to your dataset, just add a new number in the 'Field (layer)' entry box and press return. In the Table tab you can create your new table connected to your new layer.



iGHqQh <a href="http://zisjffcaxfrn.com/">zisjffcaxfrn</a>, [url=http://ixkftjhassls.com/]ixkftjhassls[/url], [link=http://ucoizyulyikc.com/]ucoizyulyikc[/link], http://haenqpzehhsi.com/

http://bestcigarettesnow.com/ newport red coupons,

http://slforum.novacartoons.com/index.php?topic=54350.new#4986 buy retin-a,

GRASS region ツール

The region definition (setting a spatial working window) in GRASS is important for working with raster layers. Vector analysis is per default not limited to any defined region definitions. All newly-created rasters will have the spatial extension and resolution of the currently defined GRASS region, regardless of their original extension and resolution. The current GRASS region is stored in the $LOCATION/$MAPSET/WIND file, and it defines north, south, east and west bounds, number of columns and rows, horizontal and vertical spatial resolution.

It is possible to switch on/off the visualization of the GRASS region in the QGIS canvas using the Grass region.png Display current GRASS region button. .

With the Grass region edit.png Edit current GRASS region icon you can open a dialog to change the current region and the symbology of the GRASS region rectangle in the QGIS canvas. Type in the new region bounds and resolution and click OK. It also allows to select a new region interactively with your mouse on the QGIS canvas. Therefore click with the left mouse button in the QGIS canvas, open a rectangle, close it using the left mouse button again and click OK. The GRASS module g.region provide a lot more parameters to define an appropriate region extend and resolution for your raster analysis. You can use these parameters with the GRASS Toolbox, described in Section 9.9.

GRASSツールボックス

The Grass tools.png Open GRASS Tools box provides GRASS module functionalities to work with data inside a selected GRASS LOCATION and MAPSET. To use the GRASS toolbox you need to open a LOCATION and MAPSET where you have write-permission (usually granted, if you created the MAPSET). This is necessary, because new raster or vector layers created during analysis need to be written to the currently selected LOCATION and MAPSET.

Working with GRASS modules

図 32: GRASS Toolbox and searchable Modules List Nix.png
(a) Modules Tree
Grass toolbox moduletree.png
(b) Searchable Modules List
Grass toolbox modulelist.png

The GRASS Shell inside the GRASS Toolbox provides access to almost all (more than 300) GRASS modules in command line modus. To offer a more user friendly working environment, about 200 of the available GRASS modules and functionalities are also provided by graphical dialogs. These dialogs are grouped in thematic blocks, but are searchable as well. You find a complete list of GRASS modules available in QGIS version \CURRENT in appendix appdx_grass_toolbox_modules. It is also possible to customize the GRASS Toolbox content. It is described in Section sec:toolbox-customizing.

As shown in Figure 32, you can look for the appropriate GRASS module using the thematically grouped Modules Tree or the searchable Modules List tab.

Clicking on a grapical module icon a new tab will be added to the toolbox dialog providing three new sub-tabs Options, Output and Manual. In Figure 33 you see an example for the GRASS module v.buffer.

図 33: GRASS Toolbox Module Dialogs Nix.png
(a) Module Options
Grass module option.png
(b) Modules Output
Grass module output.png
(c) Module Manual
Grass module manual.png
Options

The Options tab provides a simplified module dialog where you can usually select a raster or vector layer visualized in the QGIS canvas and enter further module specific parameters to run the module. The provided module parameters are often not complete to keep the dialog clear. If you want to use further module parameters and flags, you need to start the GRASS Shell and run the module in the command line.

Output

The Output tab provides information about the output status of the module. When you click the Run button, the module switches to the Output tab and you see information about the analysis process. If all works well, you will finally see a Successfully finished message.

Manual

The Manual tab shows the HTML help page of the GRASS module. You can use it to check further module parameters and flags or to get a deeper knowledge about the purpose of the module. At the end of each module manual page you see further links to the Main Help index, the Thematic index and the Full index. These links provide the same information as if you use the module g.manual


Tip 40 Display results immediately


If you want to display your calculation results immediately in your map canvas, you can use the 'View Output' button at the bottom of the module tab.



Working with the GRASS LOCATION browser

Another useful feature inside the GRASS Toolbox is the GRASS LOCATION browser. In Figure 34 you can see the current working LOCATION with its MAPSETs.

In the left browser windows you can browse through all MAPSETs inside the current LOCATION. The right browser window shows some meta information for selected raster or vector layers, e.g. resolution, bounding box, data source, connected attribute table for vector data and a command history.

図 34: GRASS LOCATION browser Nix.png
Grass mapset browser.png

The toolbar inside the Browser tab offers following tools to manage the selected LOCATION:

  • Grass add map.png Add selected map to canvas
  • Grass copy map.png Copy selected map
  • Grass rename map.png Rename selected map
  • Grass delete map.png Delete selected map
  • Grass set region.png Set current region to selected map
  • Grass refresh.png Refresh browser window

The Grass rename map.png Rename selected map and Grass delete map.png Delete selected map only work with maps inside your currently selected MAPSET. All other tools also work with raster and vector layers in another MAPSET.

Customizing the GRASS Toolbox

Nearly all GRASS modules can be added to the GRASS toolbox. A XML interface is provided to parse the pretty simple XML files which configures the modules appearance and parameters inside the toolbox.

A sample XML file for generating the module v.buffer (v.buffer.qgm) looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">

<qgisgrassmodule label="Vector buffer" module="v.buffer">
        <option key="input" typeoption="type" layeroption="layer" />
        <option key="buffer"/>
        <option key="output" />
</qgisgrassmodule>

The parser reads this definition and creates a new tab inside the toolbox when you select the module. A more detailed description for adding new modules, changing the modules group, etc. can be found on the QGIS wiki at
http://wiki.qgis.org/qgiswiki/Adding_New_Tools_to_the_GRASS_Toolbox .