The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Starting with rasterpic is very easy! You just need
an image (png, jpeg/jpg or
tif/tiff) and a spatial object from the sf
or the terra package to start using it.
Here we use the shape of Austria as an example:
library(sf)
library(terra)
library(rasterpic)
# Plot
library(tidyterra)
library(ggplot2)
# Shape and image
x <- read_sf(system.file("gpkg/austria.gpkg", package = "rasterpic"))
img <- system.file("img/vertical.png", package = "rasterpic")
# Create the raster!
default <- rasterpic_img(x, img)
autoplot(default) +
geom_sf(data = x)The function provides several options for expansion, alignment, and cropping.
With this option, the image is expanded beyond the spatial object:
Decide where to align the image:
sf,
sfc, sfg or bbox.SpatRaster, SpatVector,
SpatExtent.c(xmin, ymin, xmax, ymax).rasterpic can parse the following image formats:
png files.jpg/jpeg files.tif/tiff files.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.