Geographic Information Systems Asked on January 6, 2021
I tried raster stacking using the below code.I tried to read pixel values at a particular coordinate and few values are coming as zero where as when I tried reading the value before stacking there is some pixel value at that particular coordinate. I don’t understand why my raster stacking is causing the issue.
from rasterio import plot
import os
import earthpy.spatial as es
def image_stack(path, dest_file):
band_fnames = os.listdir(path)
band_paths = [path + fname for fname in band_fnames]
arr, arr_meta = es.stack(band_paths, dest_file)
return len(band_fnames)
The issue is with the band count of the resultant stack, I have updated it's count and now the pixel values are non-zero .
Answered by hashalluring on January 6, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP