|
@@ -119,7 +119,7 @@ gtfs <- function(conf = NULL) {
|
|
|
# Algoritmi juhend!
|
|
# Algoritmi juhend!
|
|
|
# qgis_algorithm_search_by_word(str = "pointstopath")
|
|
# qgis_algorithm_search_by_word(str = "pointstopath")
|
|
|
algorithm <- "qgis:pointstopath"
|
|
algorithm <- "qgis:pointstopath"
|
|
|
- # cat(qgis_show_help(algorithm = algorithm))
|
|
|
|
|
|
|
+ # ruut::qgis_show_help(algorithm = algorithm)
|
|
|
# Run algorithm.
|
|
# Run algorithm.
|
|
|
output <- sprintf(
|
|
output <- sprintf(
|
|
|
'postgres://dbname=\'%s\' host=%s port=%s user=\'%s\' sslmode=%s password=\'%s\' table=\"%s\".\"%s\" (geom)',
|
|
'postgres://dbname=\'%s\' host=%s port=%s user=\'%s\' sslmode=%s password=\'%s\' table=\"%s\".\"%s\" (geom)',
|
|
@@ -131,17 +131,9 @@ gtfs <- function(conf = NULL) {
|
|
|
conf$dbname, conf$host, conf$port, conf$user, conf$sslmode, conf$password,
|
|
conf$dbname, conf$host, conf$port, conf$user, conf$sslmode, conf$password,
|
|
|
conf$schema, conf$table
|
|
conf$schema, conf$table
|
|
|
)
|
|
)
|
|
|
- result <- qgisprocess::qgis_run_algorithm(
|
|
|
|
|
- algorithm = algorithm,
|
|
|
|
|
- CLOSE_PATH = 0,
|
|
|
|
|
- DATE_FORMAT = "",
|
|
|
|
|
- GROUP_FIELD = "shape_id",
|
|
|
|
|
- INPUT = input,
|
|
|
|
|
- ORDER_FIELD = "shape_pt_sequence",
|
|
|
|
|
- OUTPUT_TEXT_DIR = "/tmp/",
|
|
|
|
|
- OUTPUT = output,
|
|
|
|
|
- .quiet = TRUE
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ str <- sprintf("{ 'INPUT' : '%s', 'OUTPUT' : '%s' , 'CLOSE_PATH' : 0 , DATE_FORMAT : '', GROUP_FIELD : 'shape_id', ORDER_FIELD : 'shape_pt_sequence', OUTPUT_TEXT_DIR : '/tmp/' }", input, output)
|
|
|
|
|
+ cmd <- ruut::construct_qgis_output_result_to_better_format(str = str, algorithm = algorithm)
|
|
|
|
|
+ system(cmd)
|
|
|
} else {
|
|
} else {
|
|
|
cmd <- sprintf(
|
|
cmd <- sprintf(
|
|
|
paste0(
|
|
paste0(
|