src/cirrus/builtins/tasks/convert-to-cog/lambda_function.py
def cogify(fin, fout, nodata=None, web_optimized=False, blocksize=256,
           overview_blocksize=128, overview_resampling='nearest'):
    """ Turn a geospatial image into a COG """
    output_profile = cog_profiles.get('deflate')
    output_profile.update({
        "BIGTIFF": os.getenv("BIGTIFF", "IF_SAFER"),
        "blockxsize": blocksize,
        "blockysize": blocksize,
        "PREDICTOR": 2
    })

    config = {
        "NUM_THREADS": "ALL_CPUS",
        "GDAL_TIFF_INTERNAL_MASK": os.getenv("GDAL_TIFF_INTERNAL_MASK", True),
        "GDAL_TIFF_OVR_BLOCKSIZE": str(overview_blocksize)
    }
    cog_translate(fin, fout, output_profile, config=config,
                  nodata=nodata, overview_resampling=overview_resampling,
                  add_mask=False, web_optimized=web_optimized)
    return fout
 Turn a geospatial image into a COG 
Turn a geospatial image into a COG
Turn a geospatial image into a COG
def cogify(fin, fout, nodata=None, web_optimized=False, blocksize=256,
           overview_blocksize=128, overview_resampling='nearest'):
    output_profile = cog_profiles.get('deflate')
    output_profile.update({
        "BIGTIFF": os.getenv("BIGTIFF", "IF_SAFER"),
        "blockxsize": blocksize,
        "blockysize": blocksize,
        "PREDICTOR": 2
    })
    config = {
        "NUM_THREADS": "ALL_CPUS",
        "GDAL_TIFF_INTERNAL_MASK": os.getenv("GDAL_TIFF_INTERNAL_MASK", True),
        "GDAL_TIFF_OVR_BLOCKSIZE": str(overview_blocksize)
    }
    cog_translate(fin, fout, output_profile, config=config,
                  nodata=nodata, overview_resampling=overview_resampling,
                  add_mask=False, web_optimized=web_optimized)
    return fout
def cogify ( fin , fout , nodata = None , web_optimized = False , blocksize = 256 , overview_blocksize = 128 , overview_resampling = 'nearest' ) : output_profile = cog_profiles . get ( 'deflate' ) output_profile . update ( { "BIGTIFF" : os . getenv ( "BIGTIFF" , "IF_SAFER" ) , "blockxsize" : blocksize , "blockysize" : blocksize , "PREDICTOR" : 2 } ) config = { "NUM_THREADS" : "ALL_CPUS" , "GDAL_TIFF_INTERNAL_MASK" : os . getenv ( "GDAL_TIFF_INTERNAL_MASK" , True ) , "GDAL_TIFF_OVR_BLOCKSIZE" : str ( overview_blocksize ) } cog_translate ( fin , fout , output_profile , config = config , nodata = nodata , overview_resampling = overview_resampling , add_mask = False , web_optimized = web_optimized ) return fout
Turn a geospatial image into a COG
Turn a geospatial image into a COG
""" Turn a geospatial image into a COG """
fin
fout
nodata
web_optimized
blocksize
overview_blocksize
overview_resampling