Opened 5 years ago

Closed 3 years ago

#1444 closed task (fixed)

Build spgrass6 against grass70-dev

Reported by: kalxas Owned by: live-demo@…
Priority: critical Milestone: OSGeoLive10.0
Component: OSGeoLive Keywords: GRASS, R
Cc: live-demo@…

Change history (8)

comment:1 Changed 5 years ago by neteler

Just for the record, the "spgrass6" interface works well also with GRASS GIS 7:

GRASS 7.0.0RC1 (nc_spm_08_grass7):~ > R

R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
[...]

> install.packages("spgrass6", dependencies = TRUE)
[...]

> library(spgrass6)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 7.0.0RC1 (2014)
and location: nc_spm_08_grass7

> ncdata <- readRAST6(c("geology_30m", "elevation"))
Warning message:
statistics not supported by this driver

> str(ncdata)
Formal class 'SpatialGridDataFrame' [package "sp"] with 4 slots
  ..@ data       :'data.frame':	525000 obs. of  2 variables:
  .. ..$ geology_30m: int [1:525000] 262 262 262 262 262 262 262 262 262 262 ...
  .. ..$ elevation  : num [1:525000] 126 126 126 126 126 ...
  ..@ grid       :Formal class 'GridTopology' [package "sp"] with 3 slots
  .. .. ..@ cellcentre.offset: num [1:2] 638300 220000
  .. .. ..@ cellsize         : num [1:2] 1 1
  .. .. ..@ cells.dim        : int [1:2] 700 750
  ..@ bbox       : num [1:2, 1:2] 638300 220000 639000 220750
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : NULL
  .. .. ..$ : chr [1:2] "min" "max"
  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
  .. .. ..@ projargs: chr "+proj=lcc +lat_1=36.16666666666666 
       +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 
       +y_0=0 +no_defs +a=6378137 +"| __truncated__

> image(ncdata, attr = 2, col = terrain.colors(20))

... plots the map as expected.

comment:2 Changed 5 years ago by neteler

I spoke to fast: due to a change in some commands like v.out.ogr (1) which is used in readVECT6(), vector data cannot be read right away. The readVECT6() function needs to be updated accordingly (which is a rather trivial task I can help with).

Background: in GRASS GIS 7 a series of parameters got standardized for coherence and ease of use. When in the GRASS session, the commands accept the old parameter names and advertise the new names while this is not possible in scripts.

(1) Lookup table: http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures#Optionschanges

comment:3 Changed 5 years ago by neteler

Update: There is a new, dedicated spgrass7 package available:

https://r-forge.r-project.org/projects/spgrass/

GRASS 7.0.0svn (nc_spm_08_grass7):~ > R
...
> install.packages("spgrass7", repos="http://R-Forge.R-project.org", dependencies=T)
> library(spgrass7)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 7.0.0RC2 (2015)
and location: nc_spm_08_grass7
> 

comment:4 Changed 4 years ago by kalxas

Milestone: OSGeoLive8.5OSGeoLive9.0

Ticket retargeted after milestone closed

comment:5 Changed 4 years ago by kalxas

Milestone: OSGeoLive9.0OSGeoLive9.5

Ticket retargeted after milestone closed

comment:6 Changed 3 years ago by kalxas

Milestone: OSGeoLive9.5OSGeoLive10.0

Ticket retargeted after milestone closed

comment:7 Changed 3 years ago by wildintellect

R Package is called rgrass7 now. I've copied it from https://launchpad.net/~marutter/+archive/ubuntu/c2d4u/ , install script needs a matching update, and test.

comment:8 Changed 3 years ago by kalxas

Resolution: fixed
Status: newclosed

install script updated

Note: See TracTickets for help on using tickets.