get_area: Get area enclosed by isobole and right part of the grid

Description Usage Arguments Value Author(s) Examples

Description

This function calculates the fraction of the grid which is on the right hand side of the isobole, i.e. outside of the polygon enclosed by the isobole and the coordinate axes.

Usage

1
get_area(path, i, gridmin, gridmax, gridlens, imax)

Arguments

path

data.table(xp,yp), e.g. output from get_isobole_path()

i

Current iteration to subset gridlens

gridmin, gridmax, gridlens, imax

See fastIsoboles_iteration() or gridInfo_default()

Value

A number between 0 and 1

Author(s)

Daniel Lill (daniel.lill@intiquan.com)

Examples

1
2
3
4
5
6
# Only approximate, gets better with higher imax
path <- data.table(xp = c(0,0.5,0.5), yp = c(0.5,.5,0))
imax <- 10
gridInfo <- populationIsoboles:::gridInfo_default(1,1,imax = imax)
i <- 9
do.call(populationIsoboles:::get_area, c(list(path =path, imax = imax, i = i), gridInfo))

IntiQuan/populationIsoboles documentation built on Jan. 13, 2022, 8:29 p.m.