Package 'plover'

Title: What the Package Does (One Line, Title Case)
Description: Point in polygon.
Authors: Michael D. Sumner [aut, cre]
Maintainer: Michael D. Sumner <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2024-11-05 03:41:43 UTC
Source: https://github.com/hypertidy/plover

Help Index


insidclipper 'over(pts, polygons)' point in polygon lookup

Description

point in polygon

Usage

ic_over(pts, pol0, xyeps = NULL)

Arguments

pts

matrix of points

pol0

list of polygon matrices (or sf, sfc_M/POLYGON)

xyeps

offset,precision (WIP)

Value

integer of polygon

Examples

ic_over(matrix(runif(10), ncol = 2), list(c(0, .5, .5, 0, 0)))

Inside with clipper lib

Description

Call the clipper lib ...

Usage

inside_clipper(pts, coords, extent = NULL)

Arguments

pts

matrix of points 2 columns x,y

coords

matrix of polygon ring 2 columns x,y

extent

optional extents (WIP)

Details

WIP

Value

integer vector of point in polygon status, see Details

Examples

inside_clipper(matrix(runif(10), ncol = 2), cbind(c(0, .5, .5, 0, 0), c(0, 0, .5, 0, 0)))

Loop inside clipper polygon as matrixes

Description

Loop clipper

Usage

inside_clipper_loop_mat(pts, lcoords, xyeps = NULL)

Arguments

pts

matrix of points

lcoords

list of matrixes

xyeps

offset x, offset y, precision

Value

list

Examples

inside_clipper_loop_mat(matrix(runif(10), ncol = 2),
 list(cbind(c(0, .5, .5, 0, 0), c(0, 0, .5, 0, 0))))

Loop inside clipper polygon as vectors

Description

Loop cliper

Usage

inside_clipper_loop_x_y(pts, coordsx, coordsy)

Arguments

pts

matrix of points

coordsx

list of vectors polygon x

coordsy

list of vectors polygon y

Value

list

Examples

inside_clipper_loop_x_y(matrix(runif(10), ncol = 2), list(c(0, .5, .5, 0, 0)),
list(c(0, 0, .5, 0, 0)))

Inside with O'Rourke's InPoly

Description

Call the O'Rourke InPoly function with cpp11.

Usage

inside_orourke(pts, coords)

Arguments

pts

matrix of points 2 columns x,y

coords

matrix of polygon ring 2 columns x,y

Details

For each query point 'pts', returns one of the following relative to P 'coords': 0 : is strictly interior to P 1 : is strictly exterior to P 3 : is a vertex of P 2 : lies on the relative interior of an edge of P

Value

integer vector of point in polygon status, see Details

NOTE

this was called inside_cpp11 in the insidecpp11 package

Examples

inside_orourke(matrix(runif(10), ncol = 2), cbind(c(0, .5, .5, 0, 0), c(0, 0, .5, 0, 0)))