Преглед изворни кода

Tsentroidid listud hoonetele 'gpkg_piirkonnale_polygoonide_lisamine'.

Ardo Kubjas пре 5 година
родитељ
комит
82f43c188c
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12 0
      R/gpkg_piirkonnale_polygoonide_lisamine.R

+ 12 - 0
R/gpkg_piirkonnale_polygoonide_lisamine.R

@@ -131,6 +131,18 @@ gpkg_piirkonnale_polygoonide_lisamine <- function(obj = NULL, gpkg_home = "/tmp"
           cmd <- ruut::construct_qgis_output_result_to_better_format(str = str, algorithm = algorithm)
           cat(sprintf("\n%s\n", cmd))
           system(cmd)
+          ## ----------- lisame tsentroidid -----------
+          conf$gpkg_table <- sprintf("%s_%s", parent_table, table_suffix)
+          input <- ruut::construct_to_gpkg_output_file_str(conf = conf, is_input_str = TRUE)
+          conf$gpkg_table <- sprintf("%s_%s_p", parent_table, table_suffix)
+          output <- ruut::construct_to_gpkg_output_file_str(conf = conf, is_input_str = FALSE)
+          str <- sprintf("{ 'ALL_PARTS' : False, 'INPUT' : '%s', 'OUTPUT' : '%s' }", input, output)
+          # ruut::qgis_algorithm_search_by_word("centroid")
+          algorithm <- "native:centroids"
+          # ruut::qgis_show_help(algorithm = algorithm)
+          cmd <- ruut::construct_qgis_output_result_to_better_format(str = str, algorithm = algorithm)
+          cat(sprintf("\n%s\n", cmd))
+          system(cmd)
         }
       }
     }