simplify_polygon: Simplify a polygon to contain less than a certain number of...

Description Usage Arguments Value Examples

Description

Useful for simplifying area of interest (AOI) polygons for use with online data portals (like USGS EarthExplorer) that limit the number of vertices allowed in uploaded AOI shapefiles.

Usage

1
2
simplify_polygon(poly_obj, max_vertices, maxit = 100, multiplier = 1.05,
  initial_tolerance = "dynamic")

Arguments

poly_obj

a polygon as an sp object

max_vertices

the maximum number of vertices to allow in the simplified polygon

maxit

the maximum number of iterations to use to simplify the polygon

multiplier

a number used to increase the tolerance for each subsequent iteration, if the number of vertices in the simplified polygon is not less than /codemax_vertices

initial_tolerance

initial value for tolerance used to remove vertices from polygon. If set to the default option, "dynamic", the code will automatically set the initial_tolerance to .01 * the length of the diagonal of the bounding box of the polygon. initial_tolerance can also be set to an arbitrary value, in the same units as the polygon object.

Value

polygon with less than max_vertices vertices

Examples

1
# TODO: add an example

azvoleff/teamlucc documentation built on May 11, 2019, 5:19 p.m.