robustness to tile download failure
mdsumner opened this issue · 2 comments
mdsumner commented
We sometimes see message files like
readLines("~/.cache/.ceramic/api.mapbox.com/v4/mapbox.terrain-rgb/2/1/3@2x.png")
[1] "{\"message\":\"Tile does not exist\"}"
and, when we load these we are robust - if they are bad, we don't brick them:
line96 in get_loc.R:
bad <- file.info(files)$size < 35
The down_loader should also detect this bad file and re-download when necessary. This is the fix to https://twitter.com/Shisheng2017/status/1105069607105323008, I believe.
mdsumner commented
A minimum size of 100 bytes is probably safer, all-black 256px PNG is 270B and JPEG is 668B
mdsumner commented
I think this is fixed.