reproject from a tiff to another tiff gives "destination band 1 appears to be read only"


Please can someone explain how I align a tiff file of lights with another of population to create two numpy arrays the same size and aligned. I tried:

    population =
    lights =
    res = rio.warp.reproject(,1),,1))

This gives "CPLE_IllegalArgError: Destination band 1 appears to be read-only."

I was expecting it to read the meta data (crs, height, width and affine transform) from source and destination then return something with the data of source but the shape of destination.

Join to automatically receive all group messages.