|
|
@@ -70,22 +70,13 @@ gpkg_sellest_alustame_gpkg_loomist <- function(pk = NULL, obj = NULL, gpkg_home
|
|
|
hspacing <- (ceiling((pk_attributes$bbox["xmax"] / 100)) * 100) - (round((pk_attributes$bbox["xmin"] / 100), digits = 0) * 100)
|
|
|
vspacing <- (ceiling((pk_attributes$bbox["ymax"] / 100)) * 100) - (round((pk_attributes$bbox["ymin"] / 100), digits = 0) * 100)
|
|
|
conf$gpkg_table <- "bb"
|
|
|
- output <- ruut::construct_to_gpkg_output_file_str(conf = conf)
|
|
|
+ output <- ruut::construct_to_gpkg_output_file_str(conf = conf, is_input_str = F)
|
|
|
# ruut::qgis_algorithm_search_by_word(str = "grid")
|
|
|
algorithm <- "native:creategrid"
|
|
|
- # cat(qgisprocess::qgis_show_help(algorithm = algorithm))
|
|
|
- result <- qgisprocess::qgis_run_algorithm(
|
|
|
- algorithm = algorithm,
|
|
|
- CRS = "EPSG:3301",
|
|
|
- EXTENT = extent,
|
|
|
- HOVERLAY = 0,
|
|
|
- HSPACING = hspacing,
|
|
|
- TYPE = 2,
|
|
|
- VOVERLAY = 0,
|
|
|
- VSPACING = vspacing,
|
|
|
- OUTPUT = output
|
|
|
- # .quiet = TRUE
|
|
|
- )
|
|
|
+ # cat(ruut::qgis_show_help(algorithm = algorithm))
|
|
|
+ cmd <- sprintf("qgis_process run %s --CRS=\"EPSG:3301\" --EXTENT=\"%s\" --HOVERLAY=0 --HSPACING=%s --TYPE=2 --VOVERLAY=0 --VSPACING=%s --OUTPUT=\"%s\"", algorithm, extent, hspacing, vspacing, output)
|
|
|
+ cat(sprintf("\n%s\n", cmd))
|
|
|
+ system(cmd)
|
|
|
# Layers list
|
|
|
sf::st_layers(dsn = dsn)
|
|
|
}
|