Areal-weighted interpolation of polygon data
st_interpolate_aw(x, to, extensive, ...)
x | object of class |
---|---|
to | object of class |
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 |
#> Reading layer `nc' from data source `/tmp/RtmpCdQsky/temp_libpath64f92385e079/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 #> CRS: 4267#>a1 = st_interpolate_aw(nc["BIR74"], g, extensive = FALSE)#> Warning: st_interpolate_aw assumes attributes are constant over areas of x#>#> [1] 1.436176a2 = st_interpolate_aw(nc["BIR74"], g, extensive = TRUE)#> Warning: st_interpolate_aw assumes attributes are constant over areas of x#>#> [1] 1.000038