Learn R Programming

geospacom (version 0.5-8)

ReadPoly: Read shape files

Description

Generates a SpatialPolygonsDataFrame from a shape file

Usage

ReadPoly(shapefile, proj = GPS, fix.holes = TRUE, ID=NULL)

Arguments

shapefile
Path to a shape file
proj
The projection used in the file, default to GPS
fix.holes
By default, tries to fix holes in the polygon frame
ID
A character vector to be passed to readShapePoly. It specifies the name of a column in the .dbf file containing the ID values of the shapes - the values will be converted to a character vector. If NULL (default), the ID of the polygons is taken.

Value

A SpatialPolygonsDataFrame

Examples

Run this code
## Not run: 
# data(GPS)
# yu.reg <- ReadPoly("path/to/my/shapefile.shp", proj=GPS)
# ## End(Not run)

Run the code above in your browser using DataLab