Commit f8e85dff authored by Benjamin Pillot's avatar Benjamin Pillot
Browse files

Delete old commented code

parent 710783d1
......@@ -6,11 +6,6 @@ More detailed description.
"""
from functools import partial
from pyrasta.io_ import ESRI_DRIVER
from pyrasta.io_.files import ShapeTempFile, _copy_to_file, NamedTempFile
import gdal
def _mask(arrays, no_data):
src = arrays[0]
......@@ -42,24 +37,3 @@ def _raster_mask(raster, geodataframe, driver, output_type, no_data, all_touched
window_size=window_size,
nb_processes=1,
chunksize=1)
# with ShapeTempFile() as shp_file, \
# NamedTempFile(raster._gdal_driver.GetMetadata()['DMD_EXTENSION']) as out_file:
#
# _copy_to_file(raster, out_file.path)
# geodataframe.to_file(shp_file.path, driver=ESRI_DRIVER)
# out_ds = gdal.Open(out_file.path, 1)
# gdal.Rasterize(out_ds,
# shp_file.path,
# bands=[bd + 1 for bd in range(raster.nb_band)],
# burnValues=[10],
# allTouched=all_touched)
#
# out_ds = None
# return raster.__class__(out_file.path)
# new_raster = raster.__class__(out_file.path)
# new_raster._temp_file = out_file
# return new_raster
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment