I would like to create a new raster that contains the sum of all pixelvalues of the raster contained in a folder.
Is it possible?
li_rasters = [raster for raster in os.listdir(os.getcwd()) if os.path.splitext(raster)[-1] == '.tiff']
i am using an hyperspectral image with 158 bands. I want to calculate raster. but i get
import gdal # Import GDAL library bindings
from osgeo.gdalnumeric import *
from osgeo.gdalconst import *
import pylab as plt
import numpy as np
# The file that we shall be using
# Needs to be on current directory
filename = ('C:/Users/KIFF/Desktop/These/data/...
To resolve this matter after I loaded the new scene using
where filename_S8 = 'S8_in' as I want to read the the thermal band 8 from the Sentinel 3 data product. Then I used this line to access the (76, 76) image array as a numpy array:
Arr = newscn[filename_S8]
S3_BT = Arr.compute().data