Exemple #1
0
def test_process_tile(data):
    mbtiles.init_worker(str(data.join('RGB.byte.tif')), {
            'driver': 'PNG',
            'dtype': 'uint8',
            'nodata': 0,
            'height': 256,
            'width': 256,
            'count': 3,
            'crs': 'EPSG:3857'})
    tile, contents = mbtiles.process_tile(mercantile.Tile(36, 73, 7))
    assert tile.x == 36
    assert tile.y == 73
    assert tile.z == 7
Exemple #2
0
def test_process_tile(data):
    mbtiles.init_worker(str(data.join('RGB.byte.tif')), {
            'driver': 'PNG',
            'dtype': 'uint8',
            'nodata': 0,
            'height': 256,
            'width': 256,
            'count': 3,
            'crs': 'EPSG:3857'},
            "nearest")
    tile, contents = mbtiles.process_tile(mercantile.Tile(36, 73, 7))
    assert tile.x == 36
    assert tile.y == 73
    assert tile.z == 7
Exemple #3
0
def test_process_tile(data, tile):
    mbtiles.init_worker(
        str(data.join('RGB.byte.tif')), {
            'driver': 'PNG',
            'dtype': 'uint8',
            'nodata': 0,
            'height': 256,
            'width': 256,
            'count': 3,
            'crs': 'EPSG:3857'
        }, 'nearest')
    t, contents = mbtiles.process_tile(tile)
    assert t.x == tile.x
    assert t.y == tile.y
    assert t.z == tile.z
Exemple #4
0
def test_process_tile(data, filename, tile):
    sourcepath = str(data.join(filename))
    mbtiles.init_worker(
        sourcepath, {
            'driver': 'PNG',
            'dtype': 'uint8',
            'nodata': 0,
            'height': 256,
            'width': 256,
            'count': 3,
            'crs': 'EPSG:3857'},
        'nearest')
    t, contents = mbtiles.process_tile(tile)
    assert t.x == tile.x
    assert t.y == tile.y
    assert t.z == tile.z