Areal-weighted interpolation of polygon data

st_interpolate_aw(x, to, extensive, ...)

## Arguments

x |
object of class `sf` , for which we want to aggregate attributes |

to |
object of class `sf` or `sfc` , with the target geometries |

extensive |
logical; if TRUE, the attribute variables are assumed to be spatially extensive (like population) and the sum is preserved, otherwise, spatially intensive (like population density) and the mean is preserved. |

... |
ignored |

## Examples

#> Reading layer `nc' from data source `/tmp/RtmpnRHNNJ/temp_libpath1381650468c/sf/shape/nc.shp' using driver `ESRI Shapefile'
#> Simple feature collection with 100 features and 14 fields
#> geometry type: MULTIPOLYGON
#> dimension: XY
#> bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
#> epsg (SRID): 4267
#> proj4string: +proj=longlat +datum=NAD27 +no_defs

#> although coordinates are longitude/latitude, st_relate_pattern assumes that they are planar

a1 = st_interpolate_aw(nc["BIR74"], g, extensive = FALSE)

#> Warning: st_interpolate_aw assumes attributes are constant over areas of x

#> although coordinates are longitude/latitude, st_intersection assumes that they are planar

#> [1] 1.436176

a2 = st_interpolate_aw(nc["BIR74"], g, extensive = TRUE)

#> Warning: st_interpolate_aw assumes attributes are constant over areas of x

#> although coordinates are longitude/latitude, st_intersection assumes that they are planar

#> [1] 1.000038