kylebarron / usgs-topo-tiler

Python package to read Web Mercator map tiles from USGS Historical Topographic Maps
https://kylebarron.dev/usgs-topo-mosaic
MIT License
77 stars 3 forks source link

Debug missing quads? #5

Closed kylebarron closed 4 years ago

kylebarron commented 4 years ago

It's rare, but occasionally there are missing quadrangles: image

These are in northern Rocky Mountain National Park. The bottom right corner of the right one is in the center of Estes Park

kylebarron commented 4 years ago

This is due to the fact that very occasionally some keys returned by the National Map API don't exist.

For example, the National Map API finds 9 results for the bottom right empty square, next to Estes Park. Here the thumbnails:

['https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_466919_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_232962_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_232963_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_450448_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_450451_1957_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_232964_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_450447_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_450449_1961_24000_tn.jpg',
 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/PDF/CO/24000/CO_Estes%20Park_450450_1961_24000_tn.jpg']

While it appears that all of the thumbnails exist, it appears that some of the related full TIFFs don't. E.g.

https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/GeoTIFF/CO/CO_Estes%20Park_466919_1961_24000_geo.tif

returns

The specified key does not exist