I have 37 shapefiles with different names.Individually each of them represent a different part of a country. I would like to create a mosaic of my 37 shp to just have one a the end. To make things clear I would them on one file. My filenames are similar and only one variable on it is changeable. I've tried this but it did not work :
date <- "20210901"
#----------------------------
tileC <- c("T38JLT","T38JMT","T38LQK","T38LRJ",
"T38LRK","T38LRL","T39KUB","T39LTE")
for (i in 1:length(tileC)) {
name <- tileC[i]
contour_shp <- shapefile(glue("C:/Users/BIC/Desktop/{date}/S{date}_L_{name}_D/{date}_contour_mang_{name}.shp"))
merge <- mosaic(contour_shp)
#shapefile(merge,(glue("C:/Users/BIC/Desktop/{date}/{date}_contour_mang_madagascar.shp")))
}
Another thing is that they do not have the same SCR, could I merged them into one shapefile even if they do not have the same coordinate system ? If someone has a clue on what's wrong I am down for it !