Opened 10 years ago

Closed 7 years ago

#958 closed defect (wontfix)

v.krige does not run in GRASS 7

Reported by: cmbarton Owned by: aghisla
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-trunk
Keywords: v.krige Cc: grass-dev@…
CPU: All Platform: All

Description

v.krige is installed with GRASS 7 but does not run.

When you attempt to start it from the menu, it raises an error: "ERROR: Required parameter <column> not set:

(Name of attribute column with numerical value to be

interpolated)."

When you try to run it from the command line, it raises an error: "Loading packages, please wait... Rpy2 not found. Please install it and re-run."

Michael

Change History (13)

comment:1 Changed 10 years ago by honyk

"ERROR: Required parameter <column> not set:...

I reported this issue (for 6.5) in mailing list in January. It turned out to be a default behaviour when a vector map without proper column data is active when this command is performed. I noticed it on my sample data, but another data were Ok. To tell the truth, I don't know what exactly 'column' means in this context as during creating a new vector layer from my sparse data I didn't notice any option for that.

Rpy2 is dependency and must be installed first, see http://grass.osgeo.org/wiki/V.krige_GSoC_2009

comment:2 Changed 10 years ago by cmbarton

It turns out that there seems to be dependency after dependency for this. I had to update R from 2.9 to 2.10 to install Rpy2. Next, I had to install gstat and its dependencies. Now it looks like I need to install spgrass6. When will it end? I don't yet know.

Michael

comment:3 Changed 10 years ago by cmbarton

Well, spgrass6 is not in the R package manager. So where is it? Let's pretend I'm a GIS professional who is trying GRASS for the first time and I see a menu entry for "ordinary or block kriging". I'd be pretty frustrated right now--especially since there is no information in the launch failure error message to say that you also must install R.

Michael

comment:4 Changed 10 years ago by hamish

I assume it is installed in the usual R/CRAN command line way with install.packages("spgrass6"). Or in the R-GUI click on Packages, Install package(s)..., pick a mirror, then select the package.

oh,

http://grass.osgeo.org/statsgrass/grass6_r_install.html

##### Mac users:
install.packages("spgrass6", type="source", dependencies=TRUE)

see also

http://r-spatial.sourceforge.net/

http://cran.r-project.org/web/views/Spatial.html

http://cran.r-project.org/web/packages/spgrass6/index.html

http://grass.osgeo.org/statsgrass/

http://grass.osgeo.org/wiki/R

FWIW the dependencies are listed in the help page and this is still just new code in the development branches so the need for a little extra shine here and there is to be expected.

Hamish (who'd love to see a mini-tutorial on the wiki page)

comment:5 Changed 10 years ago by cmbarton

I do appreciate the pointers. However, spgrass6 will not install because rgdal won't install--and maybe other errors besides.

Easy access to the manual is in the module GUI. But the module GUI won't launch without the many dependencies. So you need to look it up elsewhere to try and figure out why.

I think it is great to have kriging available for GRASS. But I'm beginning to think it is somewhat premature to ship it with the main GRASS distribution and in the menu when it not only will not run with the normal GRASS dependencies, but takes a LOT of external dependencies and special compilations to even get it to launch.

A very positive thing about GRASS is that it is possible to enhance it in many ways, and that an increasing number of sophisticated packages are available in the addons library to do this.

However, I worry about having items in a standard GRASS distribution, particularly items in the menu, that don't work out of the box. And especially items in the standard distribution that require this much work to get to run.

Michael

comment:6 Changed 9 years ago by aghisla

Hi all,

the dependency tree of v.krige is its biggest weakness. The installation of all software is platform-dependent, can be perfomed in several ways, and I found lot of problems related to rpy2 code.

Sorry I had very little time to work on that, after integration of v.krige in trunk. What about removing v.krige from main code until dependencies are better handled? Alternatively, can it be turned into an optional module?

regards Anne

comment:7 Changed 9 years ago by cmbarton

Anne,

I agree with this idea. You've done a lot of work on this and I'm sure that these issues will ultimately be solved. But until then, I think it's better in the addons. As good as it is to have a krige module, it is better to make it an optional install than to have it a default install and not work.

Michael

comment:8 in reply to:  7 Changed 9 years ago by martinl

Replying to cmbarton:

I agree with this idea. You've done a lot of work on this and I'm sure that these issues will ultimately be solved. But until then, I think it's better in the addons. As good as it is to have a krige module, it is better to make it an optional install than to have it a default install and not work.

hm, is it really necessary? No way how to solve the problem without moving the module to addons and the back? Martin

comment:9 Changed 9 years ago by aghisla

Cc: aghisla added
Owner: changed from grass-dev@… to aghisla
Status: newassigned

I'm going to make v.krige optional at compilation, sounds the best choice atm.

Still, I keep the ticket open until R-GRASS binding works for GRASS7 vectors.

regards Anne

comment:10 Changed 8 years ago by hamish

Cc: grass-dev@… added; aghisla removed
Keywords: v.krige added; krige removed

Hi,

seems to work for me now (almost), bug resolved?

the list of dependencies takes a few iterations to get past, but after following the R+GRASS install instructions on the GRASS wiki, and after that is working

install.packages("put-pkg-name-here")

in an R session for all the ones v.krige complained about missing.

As commented earlier in the ticket, probably explicitly listing them in the v.krige man page, and as a footer section in the GRASS wiki's "R" page will help folks get through them quickly. I wonder how we could automate that more?


I do get one error now when I run it in grass7:

[...]
Checking rgeos availability as gpclib substitute:
TRUE
Loading required package: automap
GSelect: invalid item: descriptor 'lower' requires a 'unicode' object but received a 'str

We've seen that before in the main wx.gui, and ISTR it's an easy fix. I'm using LANG=C.

thanks, Hamish

ps- trac-tip: if you comment or change a ticket you're automatically added to the cc-list. If you take ownership you have to then manually add the grass-dev ML to the cc-list.

pps- do you lose anything by using the free-for-all-use rgeos cran package versus the first-tried free-for-commercial-use gpclib cran package? aka why not make rgeos the default?

comment:11 Changed 8 years ago by hamish

[ie free-for-(non)commercial-use gpclib ...]

comment:12 in reply to:  10 Changed 8 years ago by aghisla

Replying to hamish:

Hi,

seems to work for me now (almost), bug resolved?

the list of dependencies takes a few iterations to get past, but after following the R+GRASS install instructions on the GRASS wiki, and after that is working

install.packages("put-pkg-name-here")

in an R session for all the ones v.krige complained about missing.

As commented earlier in the ticket, probably explicitly listing them in the v.krige man page, and as a footer section in the GRASS wiki's "R" page will help folks get through them quickly. I wonder how we could automate that more?

Hello Hamish,

sorry for delay and thanks for testing.

Please see if r46642 is clearer now, then I will also add comments on "R" wikipage.


I do get one error now when I run it in grass7:

[...]
Checking rgeos availability as gpclib substitute:
TRUE
Loading required package: automap
GSelect: invalid item: descriptor 'lower' requires a 'unicode' object but received a 'str

We've seen that before in the main wx.gui, and ISTR it's an easy fix. I'm using LANG=C.

I can't replicate this error, when does it appear? I run trunk compiled now (r46642).

thanks, Hamish

ps- trac-tip: if you comment or change a ticket you're automatically added to the cc-list. If you take ownership you have to then manually add the grass-dev ML to the cc-list.

thanks, sorry for noise :)

pps- do you lose anything by using the free-for-all-use rgeos cran package versus the first-tried free-for-commercial-use gpclib cran package? aka why not make rgeos the default?

Not at all, I added it as dependency (r46643), so that gpclib is no more required.

comment:13 Changed 7 years ago by aghisla

Resolution: wontfix
Status: assignedclosed

Closing this ticket as v.krige is now under major refactoring:

http://trac.osgeo.org/grass/ticket/1186#comment:7

Note: See TracTickets for help on using tickets.