AddRanges {RapidPolygonLookup}R Documentation

Add xlim and ylim for each polygon

Description

This function computes the bounding box for each polygon and adds this information to the list. The bounding boxes can be used in various applications. Our main motivation is for the massive PointsInPolygon search to exclude those polygons as candidates whose bounding box does not contain the current point.

Usage

AddRanges(poly.list)

Arguments

poly.list

polygon list with three elements: data, polys, and poly.centers

Value

Returns augmented polygon list with additional element – "ranges"

Author(s)

Markus Loecher <markus.loecher@gmail.com> and Madhav Kumar <madhavkumar2005@gmail.com>

Examples


data(sf.polys, envir = environment())
sf.polys <- AddRanges(sf.polys)
str(sf.polys$ranges)


[Package RapidPolygonLookup version 0.1.1 Index]