|
|
@@ -53,7 +53,7 @@ pk_sellest_alustame_db_loomist <- function(pk = NULL, obj = NULL, conf = NULL) {
|
|
|
# write to postgis
|
|
|
ruut::db_create_new_schema(conf = conf)
|
|
|
conn <- ruut::db_connect(conf = conf)
|
|
|
- sf::write_sf(pk, dsn = conn, layer = c(conf$schema, "a120_piir"), driver = "PostgreSQL", fid_column_name = "id", delete_dsn = F)
|
|
|
+ sf::write_sf(pk, dsn = conn, layer = c(conf$schema, "a00_piir"), driver = "PostgreSQL", fid_column_name = "id", delete_dsn = F)
|
|
|
|
|
|
## 2. Piirikasti salvestamine
|
|
|
## konstrueerime EXTENT, HSPACING ja VSPACING väärtused piirikasti konstrueerimiseks.
|
|
|
@@ -61,7 +61,7 @@ pk_sellest_alustame_db_loomist <- function(pk = NULL, obj = NULL, conf = NULL) {
|
|
|
extent <- sprintf("%s,%s,%s,%s [EPSG:3301]", round((pk_attributes$bbox["xmin"] / 100), digits = 0) * 100, ceiling((pk_attributes$bbox["xmax"] / 100)) * 100, round((pk_attributes$bbox["ymin"] / 100), digits = 0) * 100, ceiling((pk_attributes$bbox["ymax"] / 100)) * 100)
|
|
|
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$table <- "a110_piir_bb"
|
|
|
+ conf$table <- "a00_piir_bb"
|
|
|
output <- ruut::construct_to_gpkg_output_postgres_str(conf = conf, geometry_field = "geom", geometry_type = NULL, srid = 3301, checkPrimaryKeyUnicity = FALSE, key = "id")
|
|
|
# ruut::qgis_algorithm_search_by_word(str = "grid")
|
|
|
algorithm <- "native:creategrid"
|
|
|
@@ -83,7 +83,7 @@ pk_sellest_alustame_db_loomist <- function(pk = NULL, obj = NULL, conf = NULL) {
|
|
|
conf = conf, geometry_type = "Polygon", srid = 3301,
|
|
|
checkPrimaryKeyUnicity = TRUE, key = "id", geometry_field = "geom"
|
|
|
)
|
|
|
- conf$table <- "a110_piir_bb"
|
|
|
+ conf$table <- "a00_piir_bb"
|
|
|
conf$schema <- obj
|
|
|
intersect <- ruut::construct_to_gpkg_output_postgres_str(conf = conf, geometry_type = "Polygon", srid = 3301, checkPrimaryKeyUnicity = TRUE, key = "id")
|
|
|
output <- vars$tmp_gpkg_file_output_1 # ajutine fail
|
|
|
@@ -97,7 +97,7 @@ pk_sellest_alustame_db_loomist <- function(pk = NULL, obj = NULL, conf = NULL) {
|
|
|
extent <- sprintf("%s,%s,%s,%s [EPSG:3301]", round((pk_attributes$bbox["xmin"] / 100), digits = 0) * 100, ceiling((pk_attributes$bbox["xmax"] / 100)) * 100, round((pk_attributes$bbox["ymin"] / 100), digits = 0) * 100, ceiling((pk_attributes$bbox["ymax"] / 100)) * 100)
|
|
|
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$table <- "a100_bb2"
|
|
|
+ conf$table <- "a00_bb2"
|
|
|
output <- ruut::construct_to_gpkg_output_postgres_str(conf = conf, geometry_field = "geom", geometry_type = NULL, srid = 3301, checkPrimaryKeyUnicity = FALSE, key = "id")
|
|
|
# ruut::qgis_algorithm_search_by_word(str = "grid")
|
|
|
algorithm <- "native:creategrid"
|