shapefile {raster}R Documentation

Read or write a shapefile

Description

Reading and writing of "ESRI shapefile" format spatial data. Only the three vector types (points, lines, and polygons) can be stored in shapefiles. These are simple wrapper functions around readOGR and writeOGR (rgdal package).

Usage

## S4 method for signature 'character'
shapefile(x, stringsAsFactors=FALSE, verbose=FALSE, ...)

## S4 method for signature 'Spatial'
shapefile(x, filename='', overwrite=FALSE, ...)

Arguments

x

character (a file name, when reading a shapefile) or Spatial* object (when writing a shapefile)

filename

character. Filename to write a shapefile

overwrite

Logical. Overwrite existing shapefile?

verbose

Logical. If TRUE, information about the file is printed

stringsAsFactors

Logical. If TRUE, strings are converted to factors

...

Additional arguments passed to rgdal functions readOGR or writeOGR

Value

Spatial*DataFrame (reading). Nothing is returned when writing a shapefile.


[Package raster version 2.3-12 Index]