writeToGISDataset: Write a geospatial object to a GIS dataset

View source: R/writeToGISDataset.R

writeToGISDatasetR Documentation

Write a geospatial object to a GIS dataset

Description

Function to write a geospatial object (e.g., an sf dataset) to a GIS dataset.

Usage

writeToGISDataset(
  obj,
  driver = "ESRI Shapefile",
  dsn = ".",
  delete_dsn = FALSE,
  layer = NULL,
  delete_layer = TRUE
)

Arguments

obj
  • a geospatial object to convert to GIS dataset

driver
  • name of dataset driver (run sf::st_drivers() to see installed drivers )

dsn
  • dsn for output (folder or file, depending on output)

delete_dsn
  • flag to delete the dsn before writing

layer
  • name of layer written to (assuming dsn has layers), or NULL

delete_layer
  • flag to delete the layer before writing

Details

Wrapper for functions sf::st_write for objects of class 'sf' or 'sfc' or rgdal::writeOGR for objects of class Spatial.

#–former importFrom rgdal writeOGR

Value

an invisible NULL.


wStockhausen/wtsGIS documentation built on Aug. 23, 2023, 2:31 a.m.