def process_tile(tile):
    global base_kwds, src
    # Get the bounds of the tile.
    ulx, uly = mercantile.xy(
        *mercantile.ul(tile.x, tile.y, tile.z))
    lrx, lry = mercantile.xy(
        *mercantile.ul(tile.x + 1, tile.y + 1, tile.z))

    kwds = base_kwds.copy()
    kwds['transform'] = from_bounds(ulx, lry, lrx, uly, 256, 256)

    with rasterio.open('/vsimem/tileimg', 'w', **kwds) as tmp:
        # Reproject the src dataset into image tile.
        for bidx in tmp.indexes:
            reproject(
                rasterio.band(src, bidx),
                rasterio.band(tmp, bidx))

    # Get contents of the virtual file and repair it.
    contents = bytearray(virtual_file_to_buffer('/vsimem/tileimg'))
    return tile, contents[-1:] + contents[:-1]
Test editing ASNs.
dataset/ETHPy150Open mapbox/rio-mbtiles/mbtiles/__init__.py/process_tile--crossover with--dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipapbase.py/NipapTest.test_edit_asn