
Retrieve image metadata
find_photos.RdRetrieve image metadata
Usage
find_photos(x, year = NULL, color = c("P", "C", "IR", "IRC"), oblique = FALSE)Arguments
- x
Object of class
sforsfc- year
integer; multiple years can be set with vectorc(1980, 1990)or range1980:2990. IfNULLall years available are returned- color
character; One or many of"P"(classic photo),"C"(color, rgb image),"IR"(infra-red) or"IRC"(infra-red color). All by default.- oblique
logical;FALSEfor vertical aerial photos (camera pointing straight down),TRUEfor oblique photos. UseNAorNULLto retrieve both type.
Details
By default, get_image_metadata retrieve photo extent. Centroid of photo
are contained in the dataset as the form of x_3857, y_3857. To leverage
them you can replace actual geometry with this one. See @examples.
Examples
if (FALSE) { # \dontrun{
library(sf)
x <- read_sf(system.file("extdata/penmarch.shp", package = "happign"))
images_metadata <- find_photos(x, year = 1969)
# Access centroids
centroid <- st_as_sf(
st_drop_geometry(images_metadata),
coords = c("x_3857", "y_3857"),
crs = st_crs(3857)
)
centroid <- st_transform(centroid, 4326)
plot(
st_geometry(images_metadata[1,]),
col = "grey80", border = "grey60",
main = "Photo footprint and centroid"
)
plot(st_geometry(centroid[1,]), col = "blue", pch = 20, add = TRUE)
plot(st_geometry(x), col = "red", add = TRUE)
} # }