Closed kylebarron closed 4 years ago
Should be able to get the pixel resolution (i.e. meters per pixel) from the DPI + scale: https://gis.stackexchange.com/questions/85307/how-to-calculate-size-of-a-pixel-for-a-scanned-map
Then pass that pixel resolution to zoom_for_pixelsize
with tilesize=512
to get the max zoom.
rio-tiler
gets the minzoom from
ovr_resolution = adjusted_resolution * max(h, w) / tilesize
min_zoom = zoom_for_pixelsize(ovr_resolution, tilesize=tilesize)
Or you could assume that all COGs have 6-7 levels of overviews? And set minzoom = maxzoom - 7?
rio-tiler
has a nice helper functionget_zooms
:Essentially the only things you need are the map's CRS and bounds. Bounds are clear in the bulk csv metadata. There's also a
projection
column with the following unique values:So you should see if you can easily get a CRS from those