Closed camiloramirezgo closed 2 years ago
Code works. But we need to get the resolution to be around 0.022 degrees as discussed in our Slack on the 30th of August. What is the easiest way to do this? Basically we need:
Maybe for this specific case we can modify this part of the code to not read res and extent from the raster but rather the extent from the csv and the resolution hardcoded?:
with rasterio.open(raster_base_layer) as src:
image = features.rasterize(
shapes,
out_shape=src.shape,
transform=src.transform,
all_touched=all_touched,
fill=nodata)
out_meta = src.meta
out_meta.update({"driver": "GTiff",
"height": src.height,
"width": src.width,
"transform": src.transform,
'compress': compression,
'dtype': dtype,
"crs": src.crs,
'nodata': nodata})
Another option is to sample the data taking the nearest point.
Create a function to rasterize the relative wealth index inside OnSSTOVE.