Ver Fonte

Vahekoopia töötavatest funktsioonidest.

Ardo Kubjas há 5 anos atrás
pai
commit
a31031ed06

+ 2 - 2
R/construct_qgis_output_result_to_beter_format.R

@@ -33,6 +33,8 @@
 #'
 #' }
 construct_qgis_output_result_to_beter_format <- function(str = "", algorithm = "xxxxxxxxxx") {
+  # Eemaldame reavahed
+  str <- gsub("\n", " ", str)
   # Tühjal stringil vahetame kõrvutiolevad 1-kordsed jutumärgid 2-kordsetega
   str <- gsub("''", "\"\"", str)
   # Suurte tähtede ümbert ülakomade eemaldamine
@@ -49,8 +51,6 @@ construct_qgis_output_result_to_beter_format <- function(str = "", algorithm = "
   str <- gsub("\"([ a-zA-Z0-9_ ]*)\"", "\\\\\"\\1\\\\\"", str)
   # Eemaldame komad
   str <- gsub(", ", " ", str)
-  # Eemaldame reavahed
-  str <- gsub("\n", " ", str)
   # Asendame algoritmi
   str <- gsub("algorithm", algorithm, str)
   cat(str)

+ 1 - 1
R/construct_to_gpkg_output_postgres_str.R

@@ -18,7 +18,7 @@
 #'
 #' conf <- ruut::get_config()
 #' conf$schema <- "maaamet"
-#' conf$table <- "asustusyksus"
+#' conf$table <- "epk200t"
 #' input <- ruut::construct_to_gpkg_output_postgres_str(
 #'   conf = conf, geometry_type = "Polygon", srid = 3301,
 #'   checkPrimaryKeyUnicity = TRUE, key = "id"

+ 1 - 1
man/construct_to_gpkg_output_postgres_str.Rd

@@ -38,7 +38,7 @@ See funktsioon konstrueerib 'qgisprocess' funktsioonides enamasti INPUT/OUTPUT/O
 
 conf <- ruut::get_config()
 conf$schema <- "maaamet"
-conf$table <- "asustusyksus"
+conf$table <- "epk200t"
 input <- ruut::construct_to_gpkg_output_postgres_str(
   conf = conf, geometry_type = "Polygon", srid = 3301,
   checkPrimaryKeyUnicity = TRUE, key = "id"