sp2shape {spsurvey}R Documentation

Convert an sp Package Object to an ESRI Shapefile

Description

This function creates an ESRI shapefile from an sp package object. The type of shapefile, i.e., point, polyline, or polygon, is determined by the class of the sp object, which must be either "SpatialPointsDataFrame", "SpatialLinesDataFrame", or "SpatialPolygonsDataFrame".

Usage

sp2shape(sp.obj, shpfilename="tempfile", prjfilename=NULL)

Arguments

sp.obj the sp package object.
shpfilename name (without any extension) of the output shapefile. The default is "tempfile".
prjfilename name (without any extension) of the projection file for the output shapefile. The default is NULL.

Value

An ESRI shapefile of type point, polyline, or polygon.

Author(s)

Tom Kincaid Kincaid.Tom@epa.gov

References

ESRI Shapefile Technical Description: http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf

Examples

  ## Not run: 
  sp2shape(my.sp.object, "my.shapefile")
  
## End(Not run)

[Package spsurvey version 2.0 Index]