from osgeo import gdal, gdal_array from scipy import stats import numpy dataset=gdal.Open(someraster) x=dataset.GetRasterBand(1).ReadAsArray() func = stats.norm.pdf(x, loc=m, scale=(s)) #you need to define m & s sqrtx = numpy.sqrt(x) #Write the result out - see http://www.gdal.org/formats_list.html for formats you can write to newdataset=gdal_array.SaveArray(sqrtx,newrasterpath,'GTIFF',prototype=dataset) newdataset.SetProjection(dataset.GetProjectionRef()) newdataset.SetGeoTransform(dataset.GetGeoTransform())
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.