writeogr: Write a shapefile using terra

View source: R/readogr.r

writeogrR Documentation

Write a shapefile using terra

Description

Write an ESRI Shapefile using the RGDAL library Essentially this is just a wrapper around writeVector from the terra package.

Usage

writeogr(filename, shp, driver = "ESRI Shapefile", ...)

Arguments

filename

character string. Filename (including path) of the shapefile to be written.

shp

a SpatialPointsDataFrame, SpatialLinesDataFrame, or a SpatialPolygonsDataFrame object to be written as shapefile x.

driver

chracter string. driver used to write x. Per default this is ESRI Shapefile.

...

further arguments passed on to writeOGR

Details

DEPRECATED! This wrapper splits a path to a shapefile into the dirname and the basename. The latter is passed as dsn argument the first as layer argument to writeOGR.

This now ist just a wrapper around writeVector from the terra package and kept for compability issues.

Author(s)

Simon Frey

See Also

readogr

terra::vect

Examples

    #### not run ####
    shapefilename <- "C:/TEMP/exampleshapefile.shp"
    shapefile <- "EXAMPLE"
    writeogr(x = shapefilename, shp = shapefile)
    
    #### end not run ####


freysimon/TigeR documentation built on April 18, 2024, 4:57 p.m.