sf2gvec: Write sf object to GRASS 7 vector utilising an existing or...

Description Usage Arguments Note Author(s) Examples

View source: R/link2giKarim.R

Description

Write sf object to GRASS 7 vector utilising an existing or creating a new GRASS7 environment

Usage

1
sf2gvec(x, obj_name, gisdbase, location, gisdbase_exist = FALSE)

Arguments

x

sf object corresponding to the settings of the corresponding GRASS container

obj_name

name of GRASS layer

gisdbase

GRASS gisDbase folder

location

GRASS location name containing obj_name)

gisdbase_exist

logical switch if the GRASS gisdbase folder exist default is TRUE

Note

have a look at the sf capabilities to write direct to sqlite

Author(s)

Chris Reudenbach

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
## example 
# get meuse data as sf object
require(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
    
# write data to GRASS and create gisdbase
sf2gvec(x = nc,
          obj_name = "nc_R-G",
          gisdbase = "~/temp3",
          location = "project1")
 
# read from existing GRASS          
gvec2sf(x = nc_R-G,
          obj_name = "nc_R-G",
          gisdbase = "~/temp3",
          location = "project1")

## End(Not run)

link2GI documentation built on Sept. 5, 2021, 5:34 p.m.