
Write sf object directly to `GRASS` vector utilising an existing or creating a new GRASS environment
Source:R/link2giKarim.R
sf2gvec.RdWrite sf object directly to `GRASS` vector utilising an existing or creating a new GRASS environment
Examples
run = FALSE
if (run) {
## example
require(sf)
require(sp)
require(link2GI)
data(meuse)
meuse_sf = st_as_sf(meuse,
coords = c('x', 'y'),
crs = 28992,
agr = 'constant')
# write data to GRASS and create gisdbase
sf2gvec(x = meuse_sf,
obj_name = 'meuse_R-G',
gisdbase = '~/temp3/',
location = 'project1')
# read from existing GRASS
gvec2sf(x = meuse_sf,
obj_name = 'meuse_r_g',
gisdbase = '~/temp3',
location = 'project1')
}