find_inner_polygons: Find which polygons are within another

Description Usage Arguments Details Value See Also

Description

This function takes a list of polygons (i.e. matrices with two columns), and for each polygon, checks if it lies completely within another polygon of the list.

Usage

1

Arguments

polygons

a list of matrices with two columns representing polygons (i.e. last row equals first row).

Details

It also checks for intersection, which the package doesn't deal with. The core function is taken from the function inout from package splancs.

Value

A list with a boolean vector is_interior, of same length as the given list, specifying at each index whether the polygon is inside another one; and a integer vector index_parent specifying at each index which polygon is its "container". If 0 then the polygon is not contained in any other.

See Also

The function is used in shape_from_polygons


pierrejacob/RShapeTarget documentation built on May 25, 2019, 6:07 a.m.