if (FALSE) { # tolower(Sys.info()[["sysname"]]) != "linux"
# \donttest{
# With a bbox
pict <- catr_wms_get_layer(
c(222500, 4019500, 223700, 4020700),
srs = 25830,
what = "parcel"
)
library(mapSpain)
library(ggplot2)
library(tidyterra)
ggplot() +
geom_spatraster_rgb(data = pict)
# With a spatial object
parcels <- catr_wfs_get_parcels_neigh_parcel("3662303TF3136B", srs = 25830)
# Use styles
parcels_img <- catr_wms_get_layer(parcels,
what = "buildingpart",
srs = 25830, # As parcels object
bbox_expand = 0.3,
styles = "ELFCadastre"
)
ggplot() +
geom_sf(data = parcels, fill = "blue", alpha = 0.5) +
geom_spatraster_rgb(data = parcels_img)
# }
}
Run the code above in your browser using DataLab