getRidbytpoly: getRidbytpoly for Assignment of Thiessen polygon id to point...

Description Usage Arguments Value Author(s) Examples

View source: R/getRidbytpoly.R

Description

Assign the polygon id to the data points.

Usage

1
getRidbytpoly(tpolys,pntlayer,isnearest)

Arguments

tpolys

Thiessen polygons, data format: SpatialPolygonsDataFrame.

pntlayer

Points for assignment for polygons. SpatialPointsDataFrame.

isnearest

whether to use nearest method to assign polygon id for no overlay with polygons, default: TRUE

Value

polygon id

Author(s)

Lianfa Li lspatial@gmail.com

Examples

1
2
3
4
5
6
7
8
9
  data("samplepnt","prnside")
  # Point
  x=samplepnt
  # Border
  sidepoly=prnside
  # Get the Thiessen polygons
  res=tpolygonsByBorder(x,sidepoly)
  # Assign the regional id
  rids=getRidbytpoly(res$tpolys,x)

lspatial/sptemUS documentation built on May 29, 2019, 3:42 a.m.