|
|
@@ -60,7 +60,7 @@ teeregister_teed <- function(conf = NULL) {
|
|
|
# ------- multilinestring to linestring -----------
|
|
|
# ruut::qgis_algorithm_search_by_word(str = "singleparts")
|
|
|
algorithm <- "native:multiparttosingleparts"
|
|
|
- # cat(qgisprocess::qgis_show_help(algorithm = algorithm))
|
|
|
+ # cat(ruut::qgis_show_help(algorithm = algorithm))
|
|
|
# Run algorithm.
|
|
|
input <- sprintf(
|
|
|
'postgres://dbname=\'%s\' host=%s port=%s user=\'%s\' sslmode=%s password=\'%s\' srid=3301 type=MultiLineString checkPrimaryKeyUnicity=\'1\' table=\"%s\".\"%s\" (geom)',
|
|
|
@@ -71,12 +71,9 @@ teeregister_teed <- function(conf = NULL) {
|
|
|
'postgres://dbname=\'%s\' host=%s port=%s user=\'%s\' sslmode=%s password=\'%s\' table=\"%s\".\"%s\" (geom)',
|
|
|
conf$dbname, conf$host, conf$port, conf$user, conf$sslmode, conf$password, conf$schema, conf$table
|
|
|
)
|
|
|
- result <- qgisprocess::qgis_run_algorithm(
|
|
|
- algorithm = algorithm,
|
|
|
- INPUT = input,
|
|
|
- OUTPUT = output,
|
|
|
- .quiet = TRUE
|
|
|
- )
|
|
|
+ str <- sprintf("{ 'INPUT' : '%s', 'OUTPUT' : '%s' }", input, output)
|
|
|
+ cmd <- ruut::construct_qgis_output_result_to_better_format(str = str, algorithm = algorithm)
|
|
|
+ system(cmd)
|
|
|
# ------------ drop temp table ---------
|
|
|
# Connect to db
|
|
|
conn <- ruut::db_connect()
|