def test_hillshade(): """Render hillshade from array.""" mp = mapchete.open( os.path.join(SCRIPTDIR, "testdata/cleantopo_tl.mapchete")) tile = mp.get_process_tiles(zoom=4).next() tile_process = MapcheteProcess(tile, params=mp.config.at_zoom(4)) with tile_process.open("file1") as dem: shade = tile_process.hillshade(dem.read()) assert isinstance(shade, np.ndarray)
def test_hillshade(cleantopo_tl): """Render hillshade from array.""" with mapchete.open(cleantopo_tl.path) as mp: tile = next(mp.get_process_tiles(zoom=4)) tile_process = MapcheteProcess(tile, params=mp.config.params_at_zoom(4)) with tile_process.open("file1") as dem: shade = tile_process.hillshade(dem.read()) assert isinstance(shade, np.ndarray)