% Generated by roxygen2: do not edit by hand % Please edit documentation in R/construct_to_gpkg_output_postgres_str.R \name{construct_to_gpkg_output_postgres_str} \alias{construct_to_gpkg_output_postgres_str} \title{'qgisprocess' funktsiooonides GPKG INPUT/OUTPUT konstrueerimine Postgresql salvestamiseks} \usage{ construct_to_gpkg_output_postgres_str( conf = NULL, geometry_field = "geom", geometry_type = NULL, srid = NULL, checkPrimaryKeyUnicity = FALSE, key = NULL ) } \arguments{ \item{conf}{A list() of configuration variables. Default values \code{\link[ruut]{get_config}}.} \item{geometry_field}{str A geometri field name. Default: "geom".} \item{geometry_type}{str Select: 'Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon', 'GeometryCollection','PolygonWithHole','Collection'.} \item{srid}{CRS Default: 3301. Other: 4326.} \item{checkPrimaryKeyUnicity}{TRUE/FALSE.} \item{key}{str A primary key ID, usally 'id'.} } \value{ A string "postgres://dbname='\%s' host=\%s port=\%s user='\%s' password='\%s' sslmode=\%s key='id' srid=3301 checkPrimaryKeyUnicity='1' table=\"\%s\".\"\%s\" (geom)". } \description{ See funktsioon konstrueerib 'qgisprocess' funktsioonides enamasti INPUT/OUTPUT/OVERLAY parameetri argumentide kasutatava fraasi, mis on vajalik postgresql andmebaasiga ühendamiseks. } \examples{ \dontrun{ conf <- ruut::get_config() conf$schema <- "maaamet" conf$table <- "epk200t" input <- ruut::construct_to_gpkg_output_postgres_str( conf = conf, geometry_type = "Polygon", srid = 3301, checkPrimaryKeyUnicity = TRUE, key = "id" ) conf$schema <- "data" conf$table <- "test" output <- ruut::construct_to_gpkg_output_postgres_str( conf = conf, geometry_type = NULL, srid = NULL, checkPrimaryKeyUnicity = FALSE, key = NULL ) str <- paste0("{ 'DISSOLVE' : False, 'DISTANCE' : 100, 'END_CAP_STYLE' : 2, 'INPUT' : '", input, "', 'JOIN_STYLE' : 1, 'MITER_LIMIT' : 2, 'OUTPUT' : '", output, "', 'SEGMENTS' : 5 }") algorithm <- "native:buffer" cmd <- ruut::construct_qgis_output_result_to_better_format(str = str, algorithm = algorithm) system(cmd) } } \seealso{ \code{\link[=db_connect]{db_connect()}}, \code{\link[=get_config]{get_config()}}, \code{\link[=construct_ogr2ogr_PG_connect_str]{construct_ogr2ogr_PG_connect_str()}}, \code{\link[=construct_qgis_output_result_to_better_format]{construct_qgis_output_result_to_better_format()}},\code{\link[=construct_to_gpkg_output_file_str]{construct_to_gpkg_output_file_str()}} \code{\link[=construct_ogr2ogr_PG_connect_str]{construct_ogr2ogr_PG_connect_str()}}, \code{\link[=construct_qgis_output_result_to_better_format]{construct_qgis_output_result_to_better_format()}} } \keyword{qgis_process}