Use rasterpic to create a SpatRaster
object from a Felt map
Source: R/read_felt_raster.R
read_felt_raster.Rd
Read an image feature from Felt and use the rasterpic::rasterpic_img()
function and a corresponding image URL or file path to create a SpatRaster
object based on the feature geometry.
Arguments
- x
If x is a Felt map URL, it is passed to
read_felt()
to create a data.frame of features with a "type" and "text" columns. If x is a data.frame, it is expected to be a data.frame created by reading a Felt map withread_felt()
but could be a sf object with a type column that includes the value "Image" and (if images is named) a text column with matching text. Required.- images
A vector of image file paths or URLs with a "png", "jpeg/jpg", or "tiff/tif" file extension. images must be ordered to match the order of "Image" type features in the input data.frame x or have names that match the text column for x. If images is named, any "Image" features in x with text that does not match the names for images are excluded from the returned list. Defaults to
NULL
. Optional if col is provided.- ...
Additional parameters passed to
sf::read_sf()
.- col
If features in x contain an attribute with a file path or URL, set col as the name of the attribute column. col is ignored if images is provided. Defaults to
NULL
.- crs
Coordinate reference system to return. Defaults to 3857.