[GRASS-user] Cluster whit area?

Hello everyone
I work with GRASS GIS, and arrives on time where I need to do a bit of
statistics (aggregated plots clustered) so I turn to R. but I'm a noob,
in R to... Does someone can give me a hand for my fist R experience? I
installed R ... I find a module that area to do what I want : clustTool
(I hope). But now I do not know where to start ...
I have a vector layer into GRASS-GIS, which
contains parcel of vineyards across Europe. I would group them in order
to propose a methodology for an inventory per cluster.
I hope this is clearer

thank you :slight_smile:

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

Etienne DELAY:

I work with GRASS GIS, and arrives on time where I need to do a bit of
statistics (aggregated plots clustered) so I turn to R. but I'm a noob,
in R to... Does someone can give me a hand for my fist R experience? I
installed R ... I find a module that area to do what I want : clustTool
(I hope). But now I do not know where to start ...
I have a vector layer into GRASS-GIS, which
contains parcel of vineyards across Europe. I would group them in order
to propose a methodology for an inventory per cluster.
I hope this is clearer

Bonjour Etienne!

You are probably interested in the "R statistics" grass-wiki-page [1]. In this
page, the "See also" & "Articles" sections link to useful learning material.

Nikos
---

[1] http://grass.osgeo.org/wiki/R_statistics

Bonjour Etienne!

You are probably interested in the "R statistics" grass-wiki-page [1]. In this
page, the "See also" & "Articles" sections link to useful learning material.

Nikos
---

[1] http://grass.osgeo.org/wiki/R_statistics

Hi Nikos :slight_smile:
yes I read it now, and I come back whit more questions
thank you

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

I'm come back :slight_smile:
I want to try clustTool in GRASS,
so I reset the region setting ,
I run R in grass,
I run library(clustTool)
That give mi a graphical environement, but I can't choose the data where
I want to work!!! I just can choose exemple data...

may be a basic question how to work on my data?
sorry for this noob question...:- S
--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

Hi,
you can run R in a grass terminal, and load data via spgrass6 package, readRAST6 or readVECT6.
Or export raster and read with rgdal.

Hope it helps.

Leonardo Hardtke
On 07/27/2010 01:30 PM, Etienne DELAY (deust 2010) wrote:

I'm come back :slight_smile:
I want to try clustTool in GRASS,
so I reset the region setting ,
I run R in grass,
I run library(clustTool)
That give mi a graphical environement, but I can't choose the data where
I want to work!!! I just can choose exemple data...

may be a basic question how to work on my data?
sorry for this noob question...:- S
   

On 07/27/2010 01:30 PM, Etienne DELAY (deust 2010) wrote:
> I'm come back :slight_smile:
> I want to try clustTool in GRASS,
> so I reset the region setting ,
> I run R in grass,
> I run library(clustTool)
> That give mi a graphical environement, but I can't choose the data where
> I want to work!!! I just can choose exemple data...
>
> may be a basic question how to work on my data?
> sorry for this noob question...:- S

Some ideas here:
http://casoilresource.lawr.ucdavis.edu/drupal/node/340

Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

Leonardo wrote:

you can run R in a grass terminal, and load data via
spgrass6 package,
readRAST6 or readVECT6.

see http://grass.osgeo.org/wiki/R_statistics

Le 27/07/10 20:35, Hamish a écrit :

Leonardo wrote:

you can run R in a grass terminal, and load data via
spgrass6 package,
readRAST6 or readVECT6.

see http://grass.osgeo.org/wiki/R_statistics

Thank you Leonardo, but I read it, without understanding much more about
the use of clustTool... (it's ok whit readVECT :wink: )
I dont understand...

library(spgrass6)

Vine1 <- readVECT6("VineyardHeroique1@etienne")
library(clustTool)

it's run a graphical windows...
an I can't choose my data.... ;-(

so I need an other help....

thank you

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

Since I don't understand how library (clustTool) can run, I test the
method described on the site that Dylan me advise ...
http://casoilresource.lawr.ucdavis.edu/drupal/node/340

#etape 1
#lecture de la table
x <- read.table ("vine", sep="|")
names(x) <- c('easting', 'northing', 'cat')

y <- data.frame(x[,1:2])
row.names(y) <- x$cat

#pour afficher les résultats
plot(y, pch=3)

#etape2
#charger les librairies dont on a besoin...
library(cluster)
library(flexclust)
s <- stepFlexclust(y, K=2:10, nrep=20)

But I have a problem here

Erreur dans stepFlexclust(y, K = 2:10, nrep = 20) :
  l'élément 1 est vide ;
  la partie de la liste d'arguments de 'as.integer' en cours
d'évaluation était :
  (k)

can' some one say me why? :-S
thank's

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

Sorry, an error in copy / past with a capital letter here or one should
not....
But an other probleme so :
s <- stepFlexclust(y, k=2:10, nrep=20) it's ok
y.pam <- pam(y, 5, stand=TRUE)

plot(y$easting, y$northing, col=y.pam$clustering, main="Bugsites

Spatial Clustering, 5 classes", cex=0.5, pch=16, xlab="Easting",
ylab="Northing")

points(y.pam$medoids, pch=15, col=1:5, cex=1.25) OK

but

for(i in 1:5)
{
segments(x0=y.pam$medoids[i,][[1]], y0=y.pam$medoids[i,][[2]],
x1=y$easting[y$cluster == i], y1=y$northing[y$cluster ==i], col=i, lty=3)
}

Erreur in segments(x0 = y.pam$medoids[i, ][[1]], y0 = y.pam$medoids[i, :
impossible to mix the coordinates of zero length with other

So what else ... :slight_smile:

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

On Wednesday 28 July 2010, Etienne DELAY (deust 2010) wrote:

Sorry, an error in copy / past with a capital letter here or one should
not....
But an other probleme so :
s <- stepFlexclust(y, k=2:10, nrep=20) it's ok
y.pam <- pam(y, 5, stand=TRUE)

> plot(y$easting, y$northing, col=y.pam$clustering, main="Bugsites

Spatial Clustering, 5 classes", cex=0.5, pch=16, xlab="Easting",
ylab="Northing")

> points(y.pam$medoids, pch=15, col=1:5, cex=1.25) OK

but

for(i in 1:5)
{
segments(x0=y.pam$medoids[i,][[1]], y0=y.pam$medoids[i,][[2]],
x1=y$easting[y$cluster == i], y1=y$northing[y$cluster ==i], col=i, lty=3)
}

Erreur in segments(x0 = y.pam$medoids[i, ][[1]], y0 = y.pam$medoids[i, :
impossible to mix the coordinates of zero length with other

So what else ... :slight_smile:

Sorry about that, there were 2 typos on that page... Please try the updated
version:

http://casoilresource.lawr.ucdavis.edu/drupal/node/340

Cheers,
Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

Hi!
I never used clustTool before.
  I made a try and i think I found the trick :-).
  You have to transform your (SpatialPointDataFrame) data to a dataframe...
     Vine1.df=as.data.frame(Vine1)
  and then you can "Set acctive data" in the GUI!
hope it helps!

Leonardo
On 07/27/2010 09:06 PM, Etienne DELAY (deust 2010) wrote:

Le 27/07/10 20:35, Hamish a écrit :
   

Leonardo wrote:
     

you can run R in a grass terminal, and load data via
spgrass6 package,
readRAST6 or readVECT6.
       

see http://grass.osgeo.org/wiki/R_statistics

Thank you Leonardo, but I read it, without understanding much more about
the use of clustTool... (it's ok whit readVECT :wink: )
I dont understand...

library(spgrass6)

Vine1<- readVECT6("VineyardHeroique1@etienne")
library(clustTool)

it's run a graphical windows...
an I can't choose my data.... ;-(

so I need an other help....

thank you

Sorry about that, there were 2 typos on that page... Please try the updated
version:

http://casoilresource.lawr.ucdavis.edu/drupal/node/340

Cheers,
Dylan

Hi Dylan
great it's run with out erreur... thank's
But medoids aren't on all the points... look the screen print
... what I haven't do?

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

I made my excuses to you, it works perfectly ... thank you very much
now I can go to bed happy :smiley:

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

On 07/28/2010 08:50 PM, Etienne DELAY (deust 2010) wrote:

I made my excuses to you, it works perfectly ... thank you very much
now I can go to bed happy :smiley:

Glad to hear it worked!
Leonardo

Hi Leonardo
this morning I try your trick :-p
But can you explain in more detail the handling ..

I run Grass
Run R in GARSS
library(spgrass6)
Vine1.df=as.data.frame(Vine1)
He make an erreur
Erreur dans as.data.frame(Vine1)

So if you can get me more help... :slight_smile:
Thank tou

Le 28/07/10 20:21, Leonardo Hardtke a écrit :

Hi!
I never used clustTool before.
I made a try and i think I found the trick :-).
You have to transform your (SpatialPointDataFrame) data to a dataframe...
    Vine1.df=as.data.frame(Vine1)
and then you can "Set acctive data" in the GUI!
hope it helps!

Leonardo
On 07/27/2010 09:06 PM, Etienne DELAY (deust 2010) wrote:

Le 27/07/10 20:35, Hamish a écrit :
  

Leonardo wrote:
    

you can run R in a grass terminal, and load data via
spgrass6 package,
readRAST6 or readVECT6.
       

see http://grass.osgeo.org/wiki/R_statistics

Thank you Leonardo, but I read it, without understanding much more about
the use of clustTool... (it's ok whit readVECT :wink: )
I dont understand...

library(spgrass6)

Vine1<- readVECT6("VineyardHeroique1@etienne")
library(clustTool)

it's run a graphical windows...
an I can't choose my data.... ;-(

so I need an other help....

thank you

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"

Hello all,

I’m trying to use an sqlite database for a vector file in a location created in grass 6.4 in grass7 but the only drivers listed are ogr and dbf. I thought that sqlite was to be the default database driver in 7 (http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures)? I’m sure this is operator error, can anyone please point out where I’ve gone wrong?

Many thanks for your time,
Rebecca

Hi,

2010/7/29 Rebecca Bennett <rabennett@ymail.com>:

I'm trying to use an sqlite database for a vector file in a location created
in grass 6.4 in grass7 but the only drivers listed are ogr and dbf. I
thought that sqlite was to be the default database driver in 7
(http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures)? I'm sure this is
operator error, can anyone please point out where I've gone wrong?

configure GRASS with sqlite support (default is 'no')

  --with-sqlite support SQLite functionality (default: no)
  --with-sqlite-includes=DIRS
  --with-sqlite-libs=DIRS SQLite library files are in DIRS

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Hi, you are missing something!

library(spgrass6) #start grassR interface
Vine1<- readVECT6("VineyardHeroique1@etienne") #read vector as SpatialDataFrame
Vine1.df=as.data.frame(Vine1) # Transform to dataframe

library(clustTool) #start GUI

On 07/29/2010 05:17 AM, Etienne DELAY (deust 2010) wrote:

Hi Leonardo
this morning I try your trick :-p
But can you explain in more detail the handling ..

I run Grass
Run R in GARSS
library(spgrass6)
Vine1.df=as.data.frame(Vine1)
He make an erreur
Erreur dans as.data.frame(Vine1)

So if you can get me more help... :slight_smile:
Thank tou

Le 28/07/10 20:21, Leonardo Hardtke a écrit :
   

Hi!
I never used clustTool before.
  I made a try and i think I found the trick :-).
  You have to transform your (SpatialPointDataFrame) data to a dataframe...
     Vine1.df=as.data.frame(Vine1)
  and then you can "Set acctive data" in the GUI!
hope it helps!

Leonardo
On 07/27/2010 09:06 PM, Etienne DELAY (deust 2010) wrote:
     

Le 27/07/10 20:35, Hamish a écrit :

Leonardo wrote:

you can run R in a grass terminal, and load data via
spgrass6 package,
readRAST6 or readVECT6.

see http://grass.osgeo.org/wiki/R_statistics

Thank you Leonardo, but I read it, without understanding much more about
the use of clustTool... (it's ok whit readVECT :wink: )
I dont understand...

library(spgrass6)

Vine1<- readVECT6("VineyardHeroique1@etienne")
library(clustTool)

it's run a graphical windows...
an I can't choose my data.... ;-(

so I need an other help....

thank you

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
     

Le 29/07/10 16:59, Leonardo Hardtke a écrit :

Hi, you are missing something!

library(spgrass6) #start grassR interface
Vine1<- readVECT6("VineyardHeroique1@etienne") #read vector as
SpatialDataFrame
Vine1.df=as.data.frame(Vine1) # Transform to dataframe

library(clustTool) #start GUI

Hi Leonardo
It's great that work :slight_smile:
ok now my problem is dirty data..
I clean and a try agane :wink:
Thank you very much...
thank's ...:smiley:

--
Cordialement

Etienne DELAY
Deust "Webmaster et gest. d'intranet" (IDSkype : etienne.delay.tic)
Master IUP "valorisation du patrimoine et aménagement du territoire"