<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FAureliano</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FAureliano"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FAureliano"/>
	<updated>2026-05-26T07:46:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_6_Tutorial&amp;diff=1926</id>
		<title>GRASS 6 Tutorial</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_6_Tutorial&amp;diff=1926"/>
		<updated>2006-06-17T11:42:32Z</updated>

		<summary type="html">&lt;p&gt;⚠️Aureliano: /* Grass Six Tutorial Default Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Free Software/Open Source GIS GRASS 6 is fully operational and stable version for production use.  This tutorial tries to&lt;br /&gt;
give you a hand to familiarize yourself with the improved functionality, especially in the vector engine and attribute management.&lt;br /&gt;
For further reading, see the references below.&lt;br /&gt;
&lt;br /&gt;
'''Disclaimer:''' In case the examples described here do not work properly, you are kindly invited to send us further examples and/or code bugfixes/enhancements. Enjoy the WIKI!&lt;br /&gt;
&lt;br /&gt;
This tutorial is intended for GRASS users who want to migrate from a previous release to the new GRASS Version. If you are a beginner,&lt;br /&gt;
please also consider additional [http://grass.itc.it/gdp/tutorials.php books or tutorials].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
New GRASS development has made major improvements to the vector&lt;br /&gt;
architecture. The most significant change includes a new 2- and&lt;br /&gt;
3-dimensional vector library that manages vector attributes in&lt;br /&gt;
standard database management systems (DBMS). This system provides the&lt;br /&gt;
power of true relational databases for vector attribute management&lt;br /&gt;
while preserving the flexibility of traditional GRASS topological&lt;br /&gt;
tools. GRASS now also incorporates true 3-dimensional voxels in the&lt;br /&gt;
[[http://grass.itc.it/gdp/nviz/index.html][NVIS]] visualization environment as well as [[http://grass.itc.it/grass60/index.php][numerous enhancements]] to&lt;br /&gt;
virtually every tool in the GRASS library.&lt;br /&gt;
&lt;br /&gt;
==Getting started in general==&lt;br /&gt;
&lt;br /&gt;
* [[Introductional Material]] to Linux and GRASS&lt;br /&gt;
&lt;br /&gt;
==Getting started - how to migrate to the new GRASS version==&lt;br /&gt;
&lt;br /&gt;
* [[Grass Six Tutorial Getting Started]]&lt;br /&gt;
&lt;br /&gt;
==Raster data management==&lt;br /&gt;
&lt;br /&gt;
* The raster management works as it did in previous GRASS versions.&lt;br /&gt;
&lt;br /&gt;
==Vector data management==&lt;br /&gt;
&lt;br /&gt;
===[[Grass Six Tutorial Default Settings]]=== &lt;br /&gt;
       -  Default settings for vector geometry;&lt;br /&gt;
          for vector attributes; for db.* modules&lt;br /&gt;
&lt;br /&gt;
===[[Grass Six Tutorial Geometry Management]]=== &lt;br /&gt;
        -  General notes on Geometry &lt;br /&gt;
          management; Managing the default settings; &lt;br /&gt;
          GRASS vector architecture; Geometry stored in native format;&lt;br /&gt;
          Geometry stored in SHAPE file; &lt;br /&gt;
          Import/export of vector data Geometry;&lt;br /&gt;
          Generating vector geometry from various sources&lt;br /&gt;
&lt;br /&gt;
===[[Grass Six Tutorial Attribute Management]]===&lt;br /&gt;
        - General notes on Attribute &lt;br /&gt;
          management; Managing the default settings; Examples;&lt;br /&gt;
          Database Schema&lt;br /&gt;
&lt;br /&gt;
==Usage examples==&lt;br /&gt;
&lt;br /&gt;
===Basic usage examples===&lt;br /&gt;
&lt;br /&gt;
===Complex usage examples===&lt;br /&gt;
&lt;br /&gt;
===Vector network analysis examples===&lt;br /&gt;
&lt;br /&gt;
===Vector overlay/clipping examples===&lt;br /&gt;
&lt;br /&gt;
===Examples from US National Atlas===&lt;br /&gt;
&lt;br /&gt;
===FAQ (Frequently Asked Questions)===&lt;br /&gt;
&lt;br /&gt;
* Grass Six Tutorial Faq&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
* Grass Six Tutorial Troubleshooting&lt;br /&gt;
&lt;br /&gt;
==Links of interest==&lt;br /&gt;
&lt;br /&gt;
* GRASS-GMT Examples: http://169.237.35.250/~dylan/grass_user_group/&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
&lt;br /&gt;
===GRASS and R kriging interpolation===&lt;br /&gt;
&lt;br /&gt;
====Mini How to interpolate using kriging with GRASS and R====&lt;br /&gt;
&lt;br /&gt;
             ORDINARY KRIGING IN R WITH GRASS6 DATA&lt;br /&gt;
&lt;br /&gt;
Of all the methods we tried this is the most easy and (I suppose) exact too:&lt;br /&gt;
&lt;br /&gt;
You have to have in your library the packages &amp;quot;gstat&amp;quot; and &amp;quot;spgrass6&amp;quot;, you can download this last one directly from R using the command &amp;quot;install.packages&amp;quot;.&lt;br /&gt;
In GRASS we have a vector file named &amp;quot;giaciture_cat_clean3&amp;quot; and we want to do a prediction on this data...&lt;br /&gt;
these are the commmands:&lt;br /&gt;
&lt;br /&gt;
enter R from the GRASS prompt, and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
library(spgrass6) &lt;br /&gt;
&lt;br /&gt;
#get vector points as SpatialPointsDataFrame &lt;br /&gt;
giaciture &amp;lt;- getSites6sp(&amp;quot;giaciture_cat_clean3&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
class(giaciture) #shows the class of &amp;quot;giaciture&amp;quot; (SpatialPointsDataFrame)&lt;br /&gt;
 &lt;br /&gt;
G &amp;lt;- gmeta6() #get region from GRASS to R&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
now if you want you can continue to work in R from GRASS or not...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#create a grid from the region settings of GRASS, it is very important&lt;br /&gt;
# to have square cells, so you can set the region settings of GRASS or&lt;br /&gt;
# you can give directly square dimensions using the values:  &lt;br /&gt;
# e.g.&amp;quot;cells.dim=c(50,50)&amp;quot;&lt;br /&gt;
grd &amp;lt;- GridTopology(cellcentre.offset=c(G$west+(G$ewres/2)&lt;br /&gt;
                    ,G$south+(G$nsres/2))&lt;br /&gt;
                    ,cellsize=c(G$ewres, G$nsres)&lt;br /&gt;
                    ,cells.dim=c(G$cols, G$rows)) &lt;br /&gt;
&lt;br /&gt;
#create a SpatialGridDataFrame&lt;br /&gt;
mask_SG &amp;lt;- SpatialGridDataFrame(grd&lt;br /&gt;
                                ,data=list(k=rep(1,G$cols*G$rows))&lt;br /&gt;
                                ,proj4string=CRS(G$proj4)) &lt;br /&gt;
&lt;br /&gt;
class(mask_SG)&lt;br /&gt;
&lt;br /&gt;
library(gstat)&lt;br /&gt;
&lt;br /&gt;
cvgm &amp;lt;- variogram(IMMERSIONE~1,locations=giaciture,width=400,cutoff=4000)&lt;br /&gt;
#create variogram, and &amp;quot;IMMERSIONE&amp;quot; &lt;br /&gt;
#here is the our variable, the variable on wich we have to do the prediction,&lt;br /&gt;
# ~ 1 select the type of kriging, this is the ordinary one&lt;br /&gt;
&lt;br /&gt;
efitted &amp;lt;- fit.variogram(cvgm,vgm(psill=5000,model=&amp;quot;Exp&amp;quot;,range=1500,nugget=8000))&lt;br /&gt;
# choose the model to fit variogram (here is exponential) and give the&lt;br /&gt;
# estimated parameters of the variogram (partial sill, range and nugget)&lt;br /&gt;
&lt;br /&gt;
OK_pred &amp;lt;- krige(IMMERSIONE~1,locations=giaciture,newdata=mask_SG,model=efitted)&lt;br /&gt;
# make the kriging prediction&lt;br /&gt;
&lt;br /&gt;
names(OK_pred) #show the name of variable kriged&lt;br /&gt;
&lt;br /&gt;
writeRast6sp(OK_pred,&amp;quot;OK_pred&amp;quot;,zcol=&amp;quot;var1.pred&amp;quot;,NODATA=-9999) &lt;br /&gt;
#write a raster file and save it in GRASS, now you can open it from there.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
that's all! &lt;br /&gt;
&lt;br /&gt;
special thanks to Roger Bivand, ever ready to lend a hand!&lt;br /&gt;
&lt;br /&gt;
* GRASS &amp;lt;a href=&amp;quot;http://grass.itc.it/gdp/tutorials.php&amp;quot;&amp;gt;books and tutorials&amp;lt;/a&amp;gt;&lt;br /&gt;
* GRASS 6 Tutorial: http://www.gdf-hannover.de/literature&lt;br /&gt;
* Translation Portal for GRASS 6 Tutorial http://www.gdf-hannover.de/translation&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>⚠️Aureliano</name></author>
	</entry>
</feed>