write_shapefile: Function to export geometries as shapefiles.

View source: R/write_shapefile.R

write_shapefileR Documentation

Function to export geometries as shapefiles.

Description

write_shapefile uses rgdal::writeOGR for the shapefile writer and will write projection information. write_shapefile will create the directory where the shapefile is to be exported if necessary.

Usage

write_shapefile(sp, file)

Arguments

sp

Spatial object to be written as a shapefile.

file

Filename of shapefile to write. file will be cleaned to be the "base" filename because many files make up a shapefile.

Author(s)

Stuart K. Grange

Examples

## Not run: 

write_shapefile(sp_county, "~/Desktop/county_spatial_data")


## End(Not run)


skgrange/gissr documentation built on June 20, 2024, 12:02 a.m.