Learn R Programming

stppSim (version 1.3.4)

poly_tester: Geometry and Coordinate Reference System test of a polygon

Description

Tests whether a polygon has the correct geometry, namely; S4 or sf. Also, tests that there is a valid projection attached to the polygon.

Usage

poly_tester(poly)

Value

Returns error messages, or mute

Arguments

poly

(as spatialPolygons, spatialPolygonDataFrames, or simple features). A spatial polygon object.

Details

Returns an error message if the polygon is not in the correct geometry or CRS.

Examples

Run this code
#load boundary of Camden
load(file = system.file("extdata", "camden.rda",
package="stppSim"))
boundary = camden$boundary # get boundary
poly_tester(poly=boundary)

Run the code above in your browser using DataLab