mSummarizer: summarize attributes over a containing geometry

Description Usage Arguments Details Examples

Description

Convenience wrapper around gPolyByIntersect that applies a function over specified attributes in the reference set. It allows for buffering the input container.

Usage

1
2
mSummarizer(container, reference, buffer = 1, colnamevec, centroid = F,
  threshold = 0.99, FUN)

Arguments

container

The thing you want to summarize within

reference

The thing whose attributes you want to summarize

buffer

How much you want to blow up the summarizing container (in meters)

colnamevec

A vector of column names corresponding to those in the container whose values will be summarized

centroid

Whether to use containing centroids for choosing reference geometries within the container

threshold

the overlap percentage to use when centroid = F

Details

Note: careful, it's pretty fragile

Examples

1
mSummarizer(cambridge_town, boston_blocks, buffer = 0, c("total_pop", "total_hh"), centroid = T, FUN = "sum")

townleym/mSpatial documentation built on May 31, 2019, 6:46 p.m.