I'm looking for a raster file that has all quadkeys of Bing Maps for a given zoom level. Does that exist? If not, how could I create it myself in R?
I have spatial data as a set of shapefiles (none of which covers all tiles of the globe) for the whole world with a resolution of about 600m x 600m per pixel/geometry (equivalent to zoom level 16) and would like to extract that data for all countries in the world (which I also have as a shapefile). Since the quadkeys are unique the easiest way would be to get for each country the list of quadkeys that belong to it and then to use that to merge it with the shapefiles (that I can convert to simple data.frames, thus avoiding spatial operations).
I tried using the function "st_intersection" to combine the two shapefiles, but that crashes R for many cases. I also tried to combine the different shapefiles first, creating a "complete" one, but that also crashes R.
If I could create a raster file with all quadkeys, I could simply stack this with the rasterised country codes and convert both to a data.frame and I would be done with the spatial operations. Unfortunately I couldn't find a raster, nor an explanation on how I would create it myself.