Find all Census blocks in a polygon, using internal point of block
Source:R/get_blockpoints_in_shape.R
shapefile2blockpoints.Rd
Find all Census blocks in a polygon, using internal point of block
Usage
shapefile2blockpoints(
polys,
addedbuffermiles = 0,
blocksnearby = NULL,
dissolved = FALSE,
safety_margin_ratio = 1.1,
crs = 4269,
updateProgress = NULL
)
Arguments
- polys
Spatial data as from sf::st_as_sf(), with points as from
shapefile_from_sitepoints()
, or a table of points with lat,lon columns that will first be converted here using that function, or polygons- addedbuffermiles
width of optional buffering to add to the points (or edges), in miles
- blocksnearby
optional table of blocks with blockid, etc (from which lat,lon can be looked up in blockpoints dt)
- dissolved
If TRUE, use sf::st_union(polys) to find unique blocks inside any one or more of polys
- safety_margin_ratio
multiplied by addedbuffermiles, how far to search for blocks nearby using getblocksnearby(), before using those found to do the intersection via sf::
- crs
used in st_as_sf() and st_transform() and shape_buffered_from_shapefile_points(), crs = 4269 or Geodetic CRS NAD83
- updateProgress
optional Shiny progress bar to update
Value
same as get_blockpoints_in_shape()