copy_gpkg_to_db.Rd 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/copy_gpkg_to_db.R
  3. \name{copy_gpkg_to_db}
  4. \alias{copy_gpkg_to_db}
  5. \title{Export GPKG to PostgreSQL}
  6. \usage{
  7. copy_gpkg_to_db(gpkg = NULL, layer = NULL, conf = NULL)
  8. }
  9. \arguments{
  10. \item{gpkg}{Gpkg file path.}
  11. \item{layer}{A gpkg file layer \code{\link[sf:st_layers]{sf::st_layers()}}.}
  12. \item{conf}{A list() of configuration variables. Default values \code{\link[ruut]{get_config}}.}
  13. }
  14. \value{
  15. No output.
  16. }
  17. \description{
  18. Exports a gpkg file layer into a PostgreSQL database.
  19. }
  20. \details{
  21. gtype: Output geometry type 'enum':. Acceptable values: Number of selected option, e.g. '1' or Comma separated list of options, e.g. c(1,3). See more: \url{https://gdal.org/drivers/vector/pg.html}.
  22. \itemize{
  23. \item 0:
  24. \item 1: NONE
  25. \item 2: GEOMETRY
  26. \item 3: POINT
  27. \item 4: LINESTRING
  28. \item 5: POLYGON
  29. \item 6: GEOMETRYCOLLECTION
  30. \item 7: MULTIPOINT
  31. \item 8: MULTIPOLYGON
  32. \item 9: MULTILINESTRING
  33. }
  34. }
  35. \examples{
  36. \dontrun{
  37. conf <- ruut::get_config()
  38. gpkg_file <- "/home/ardo/aaa/data/gpkg/grids/estonian_grids.gpkg"
  39. # Vaata layer'eid
  40. sf::st_layers(gpkg_file)
  41. # Vali layer
  42. layer <- "epk200t_grid"
  43. conf$table <- "aaa_1"
  44. conf$schema <- "data"
  45. copy_gpkg_to_db(gpkg = gpkg_file, layer = layer, conf = conf)
  46. copy_gpkg_to_db(gpkg = gpkg_file, conf = conf) # viga
  47. }
  48. }
  49. \seealso{
  50. \code{\link[=get_config]{get_config()}}, \code{\link[=copy_shp_to_db]{copy_shp_to_db()}}, \code{\link[=copy_qgis_object_to_db]{copy_qgis_object_to_db()}}
  51. }
  52. \keyword{gpkg}
  53. \keyword{postgis,}