I'm trying to intercept SpatialLinesDataFrame (170 fields and 140000 lines) with a SpatialPolygonDataFrame using RQGIS.I'm following the instruction from github. I modified the ../processing/gui/AlgorithmExecutor.py files accordingly. My lines and polygon have numeric dataframes.
I'm running the following code:
library(maptools)
library(raster)
library(rgdal)
library(RQGIS)
setwd("/data/opera/sergio")
load("data/out/network/lines.rda") #lines
load("data/out/network/g.rda") #polygon
dir_tmp <- "/home/sergio"
my_env <- set_env()
params <- get_args_man(alg = "qgis:intersection",
qgis_env = my_env)
params$INPUT <- lines
params$INPUT2 <- g
params$OUTPUT <- file.path(dir_tmp, "COg.shp")
system.time(out <- run_qgis(alg = "qgis:intersection",
params = params,
load_output = params$OUTPUT,
qgis_env = my_env))
Error in dirname(x) : a character vector argument expected
my_env
$root
[1] "/usr"
$qgis_prefix_path
[1] "/usr/bin/qgis"
$python_plugins
[1] "/usr/share/qgis/python/plugins"
How to fix: Error in dirname(x) : a character vector argument expected?