in
|
assets = [*new_assets, *assets] if add_first else [*assets, *new_assets] |
we either append the new dataset before or after the existing dataset. This behaviour could be confusing for some users
# Existing mosaic
mosaic_1 = {"tile": {"0": ["cog1.tif"]}}
# New list of COG
dataset = ["2.tif", "3.tif"]
# Add First
with MosaicBackend(None, mosaic_def = mosaic_1) as mosaic:
feats = get_footprints(dataset)
mosaic.update(feats, add_first=True)
> mosaic_1 = {"tile": {"0": ["2.tif", "3.tif", "cog1.tif"]}}
# Add Last
with MosaicBackend(None, mosaic_def = mosaic_1) as mosaic:
feats = get_footprints(dataset)
mosaic.update(feats, add_first=False)
> mosaic_1 = {"tile": {"0": ["cog1.tif", "2.tif", "3.tif"]}}
in
cogeo-mosaic/cogeo_mosaic/backends/base.py
Line 87 in 0e0a122
we either append the new dataset before or after the existing dataset. This behaviour could be confusing for some users