Last data update: 2014.03.03

R: Read shape files
ReadPolyR Documentation

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

Author(s)

Mathieu Cossuta, Davide Morselli

Examples

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

## End(Not run)

Results