Learn R Programming

spsurvey (version 4.0.0)

shape2spList: Internal Function: Create Object of Class Lines or Class Polygons

Description

This function creates an object of class Lines for a Polyline shapefile or class Polygons for a Polygon shapefile.

Usage

shape2spList(shape, shp.type, ID)

Arguments

shape

A single record from the .shp file of the shapefile.

shp.type

The type of shapefile, which is either "arc" for a Polyline shapefile or "poly" for a Polygon shapefile.

ID

The shape ID value, i.e., the shapefile record number.

Value

Object of class Lines for a Polyline shapefile or class Polygons for a Polygon shapefile - see documentation for the sp package for further details.

Other Functions Required

Line

sp package function to create an object of class Line

Lines

sp package function to create an object of class Lines

Polygon

sp package function to create an object of class Polygon

Polygons

sp package function to create an object of class Polygons