Proper use for non-overlapping mosaics #290
-
In my use case, I have a very large (over 50,000) set of non-overlapping, uniformly-sized, unchanging, 3-band color COGs that comprise a very large geographic extent as a single mosaic. It's unclear to me if:
MosaicJSON seems to be geared toward overlapping COGs, where pixel selection is important, so my instinct is that it doesn't apply in this case. I started by running TiTiler in Docker:
and pointing TiTiler at a virtual mosaic .vrt file (built with But when I tried the whole set (the VRT file was ~109MB at this point), nothing rendered, and the TiTiler log indicated it was endlessly booting new workers:
This tool looks awesome - thanks for building it! But am I mis-using it? Did I overlook or mis-read some documentation? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
👋 @mattskone, thanks for starting the discussion. This kinda of question seems to be asked by a lot of people recently... which means we should finish the mosaic docs 😂 As you mentioned you could technically use VRT and the /cog endpoint, BUT working with big VRT is usually not really performant (as far of my knowledge). Rasterio/GDAL might end up fetching a lot of file (especially at low resolution). If you have a lot of small COG, their native zoom might be hight (read hight zoom level), but with a VRT, rio-tiler will assume One thing that is maybe bad in rio-tiler, is that to calculate the 👇 here is an example, all COG have a native resolution of 20m (zoom 13) and 5 overviews (= min zoom 8) When you create a VRT, the number of possible overview will be quite big (the bigger the file is, the more overview you can have) Thus when starting TiTiler, it will assume your VRT can produce tiles at low zoom ... which is technically true but not efficient (which is why we restrict zoom level == overviews). The mosaicJSON spec, keeps the reference to the min zoom of your COG when creating it which is why it tends to be faster for some case (but it's technically like a VRT, just has the minzoom reference in it)
MosaicJSON is also great for non-overlapping COG, it just add the method for pixel selection. I'm going to open an issue on rio-tiler to see if we can resolve the Let me know, if at least part of ☝️ make sense. |
Beta Was this translation helpful? Give feedback.
-
I've opened an issue to add more information in the documentation about the zoom levels definition (because I think the problem you are facing is that at low resolution, GDAL is trying to open too many files). we should also add a specific note about VRT telling that it shouldn't be use in the COG/viewer (because of the metadata endpoint) |
Beta Was this translation helpful? Give feedback.
I've opened an issue to add more information in the documentation about the zoom levels definition (because I think the problem you are facing is that at low resolution, GDAL is trying to open too many files). we should also add a specific note about VRT telling that it shouldn't be use in the COG/viewer (because of the metadata endpoint)
#291