Commit 8084e27e authored by benjaminpillot's avatar benjaminpillot
Browse files

Change layer name in zonal_stats

* Replace "ID" (often already used in geo layers) by "__ID__"
parent aaaf3d8f
......@@ -86,10 +86,10 @@ def _zonal_stats(raster, layer, band, stats, customized_stat,
if customized_stat is not None:
stats_calc.update(customized_stat)
layer["ID"] = layer.index
layer["__ID__"] = layer.index
raster_layer = raster.rasterize(layer, raster.projection, raster.x_size,
raster.y_size, raster.geo_transform,
attribute="ID", all_touched=all_touched)
attribute="__ID__", all_touched=all_touched)
bounds = layer.bounds.to_numpy()
zone = zone_gen(raster, bounds, band)
......
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