(no subject)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Jackson Rodrigues
Dear all,

I am trying to work with grass7 in R but I got the following error:

Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) : no stars support yet

Could anyone give me a support on this issue?

I have searched for it elsewhere but no answer found so far.

Reproducible exemple below from Rbloggers

#####################
library(raster)

raster_image <- raster::raster(system.file("external/test.grd", package = "raster"))
raster_image <- as(raster_image, "SpatialGridDataFrame")
plot(raster_image)

loc <- rgrass7::initGRASS("C:/Program Files/GRASS GIS 7.4.4", home = tempdir(), override = TRUE)

rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite"))
#Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) :
#no stars support yet
  #####################  

Best regards,

Jackson

--



_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Thomas Adams-2
Jackson,

Did you first invoke R in your GRASS terminal window, then, at the R prompt:

library(rgrass7)

Tom

On Thu, Dec 5, 2019 at 1:03 PM Jackson Rodrigues <[hidden email]> wrote:
Dear all,

I am trying to work with grass7 in R but I got the following error:

Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) : no stars support yet

Could anyone give me a support on this issue?

I have searched for it elsewhere but no answer found so far.

Reproducible exemple below from Rbloggers

#####################
library(raster)

raster_image <- raster::raster(system.file("external/test.grd", package = "raster"))
raster_image <- as(raster_image, "SpatialGridDataFrame")
plot(raster_image)

loc <- rgrass7::initGRASS("C:/Program Files/GRASS GIS 7.4.4", home = tempdir(), override = TRUE)

rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite"))
#Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) :
#no stars support yet
  #####################  

Best regards,

Jackson

--


_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats


--
Thomas E Adams, III
1724 Sage Lane
Blacksburg, VA 24060
[hidden email] (personal)

1 (513) 739-9512 (cell)


_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Veronica Andreo
You first need to type:
use_sp()

Then, read the raster from grass. For vector maps on the other hand, you can either set:

use_sp()

or

use_sf()

before the import.

Best,
Vero



El jue., 5 dic. 2019 15:20, Thomas Adams <[hidden email]> escribió:
Jackson,

Did you first invoke R in your GRASS terminal window, then, at the R prompt:

library(rgrass7)

Tom

On Thu, Dec 5, 2019 at 1:03 PM Jackson Rodrigues <[hidden email]> wrote:
Dear all,

I am trying to work with grass7 in R but I got the following error:

Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) : no stars support yet

Could anyone give me a support on this issue?

I have searched for it elsewhere but no answer found so far.

Reproducible exemple below from Rbloggers

#####################
library(raster)

raster_image <- raster::raster(system.file("external/test.grd", package = "raster"))
raster_image <- as(raster_image, "SpatialGridDataFrame")
plot(raster_image)

loc <- rgrass7::initGRASS("C:/Program Files/GRASS GIS 7.4.4", home = tempdir(), override = TRUE)

rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite"))
#Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) :
#no stars support yet
  #####################  

Best regards,

Jackson

--


_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats


--
Thomas E Adams, III
1724 Sage Lane
Blacksburg, VA 24060
[hidden email] (personal)

1 (513) 739-9512 (cell)

_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats

_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Jackson Rodrigues
Hi Verônica, 

Perfect!

simply run use_sp() before and voilà.

Thank you,

Best

Jackson

Em qui, 5 de dez de 2019 16:53, Veronica Andreo <[hidden email]> escreveu:
You first need to type:
use_sp()

Then, read the raster from grass. For vector maps on the other hand, you can either set:

use_sp()

or

use_sf()

before the import.

Best,
Vero



El jue., 5 dic. 2019 15:20, Thomas Adams <[hidden email]> escribió:
Jackson,

Did you first invoke R in your GRASS terminal window, then, at the R prompt:

library(rgrass7)

Tom

On Thu, Dec 5, 2019 at 1:03 PM Jackson Rodrigues <[hidden email]> wrote:
Dear all,

I am trying to work with grass7 in R but I got the following error:

Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) : no stars support yet

Could anyone give me a support on this issue?

I have searched for it elsewhere but no answer found so far.

Reproducible exemple below from Rbloggers

#####################
library(raster)

raster_image <- raster::raster(system.file("external/test.grd", package = "raster"))
raster_image <- as(raster_image, "SpatialGridDataFrame")
plot(raster_image)

loc <- rgrass7::initGRASS("C:/Program Files/GRASS GIS 7.4.4", home = tempdir(), override = TRUE)

rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite"))
#Error in rgrass7::writeRAST(raster_image, "raster_image", flags = c("overwrite")) :
#no stars support yet
  #####################  

Best regards,

Jackson

--


_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats


--
Thomas E Adams, III
1724 Sage Lane
Blacksburg, VA 24060
[hidden email] (personal)

1 (513) 739-9512 (cell)

_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats

_______________________________________________
grass-stats mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-stats