Closed iamtekson closed 8 months ago
--------------------------------------------------------------------------- NameError Traceback (most recent call last) /mnt/d/tek/sm/code/prediction_merge.ipynb Cell 25 line 4 [1](vscode-notebook-cell://wsl%2Bubuntu/mnt/d/tek/sm/code/prediction_merge.ipynb#X31sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0) from geotile.utils import vectorize [2](vscode-notebook-cell://wsl%2Bubuntu/mnt/d/tek/sm/code/prediction_merge.ipynb#X31sdnNjb2RlLXJlbW90ZQ%3D%3D?line=1) import fiona ----> [4](vscode-notebook-cell://wsl%2Bubuntu/mnt/d/tek/sm/code/prediction_merge.ipynb#X31sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3) vectorize('../data/img&pred/Hetauda_S2_2016_12_pred.tif', '../data/pred_shp/Dang_S2_2016_11_pred.shp') File [~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:100](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/d/tek/sm/code/~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:100), in vectorize(input_raster, output_file, band, mask) [97](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/d/tek/sm/code/~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:97) shapes = rio.features.shapes(raster, transform=src.transform, mask=mask) [99](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/d/tek/sm/code/~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:99) # Save the vectorized raster --> [100](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/d/tek/sm/code/~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:100) with fiona.open(output_file, 'w', crs=src.crs, driver='ESRI Shapefile', schema={'geometry': 'Polygon', 'properties': [('value', 'int')]}) as dst: [101](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/d/tek/sm/code/~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:101) for geom, value in shapes: [102](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/d/tek/sm/code/~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/utils.py:102) dst.write({'geometry': geom, 'properties': {'value': value}}) NameError: name 'fiona' is not defined