def test_input_data(mp_tmpdir, cleantopo_br):
    'Check GeoTIFF proces output as input data.'
    with mapchete.open(cleantopo_br.path) as mp:
        tp = BufferedTilePyramid('geodetic')
        tile = tp.tile(5, 5, 5)
        output_params = dict(grid='geodetic', format='GeoTIFF', path=mp_tmpdir, pixelbuffer=0, metatiling=1, bands=2, dtype='int16', delimiters=dict(bounds=Bounds((- 180.0), (- 90.0), 180.0, 90.0), effective_bounds=Bounds((- 180.439453125), (- 90.0), 180.439453125, 90.0), zoom=[5], process_bounds=Bounds((- 180.0), (- 90.0), 180.0, 90.0)))
        output = gtiff.OutputDataWriter(output_params)
        with output.open(tile, mp) as input_tile:
            for data in [input_tile.read(), input_tile.read(1), input_tile.read([1])]:
                assert isinstance(data, ma.masked_array)
                assert input_tile.is_empty()
        with output.open(tile, mp) as input_tile:
            pass
Check GeoTIFF proces output as input data.
def test_input_data(mp_tmpdir, cleantopo_br):
    
    with mapchete.open(cleantopo_br.path) as mp:
        tp = BufferedTilePyramid('geodetic')
        tile = tp.tile(5, 5, 5)
        output_params = dict(grid='geodetic', format='GeoTIFF', path=mp_tmpdir, pixelbuffer=0, metatiling=1, bands=2, dtype='int16', delimiters=dict(bounds=Bounds((- 180.0), (- 90.0), 180.0, 90.0), effective_bounds=Bounds((- 180.439453125), (- 90.0), 180.439453125, 90.0), zoom=[5], process_bounds=Bounds((- 180.0), (- 90.0), 180.0, 90.0)))
        output = gtiff.OutputDataWriter(output_params)
        with output.open(tile, mp) as input_tile:
            for data in [input_tile.read(), input_tile.read(1), input_tile.read([1])]:
                assert isinstance(data, ma.masked_array)
                assert input_tile.is_empty()
        with output.open(tile, mp) as input_tile:
            pass