Hi,
I have raster which I would like to get the maximum value from using ArchGDAL but I get only the (I believe 98th percentile (as it is done in QGIS)
using ArchGDAL
const AG = ArchGDAL
dataset = AG.readraster("raster.tif")
GDAL Dataset (Driver: GTiff/GeoTIFF)
File(s):
/Volumes/Black/Git_Data/node_creation/FlowR/su30m_nepal_propa_17843_nb_propagations.tif
/Volumes/Black/Git_Data/node_creation/FlowR/su30m_nepal_propa_17843_nb_propagations.tif.aux.xml
Dataset (width x height): 79607 x 46661 (pixels)
Number of raster bands: 1
[GA_ReadOnly] Band 1 (Gray): 79607 x 46661 (UInt32)
band = AG.getband(dataset, 1)
[GA_ReadOnly] Band 1 (Gray): 79607 x 46661 (UInt32)
blocksize: 79607×1, nodata: nothing, units: 1.0px + 0.0
overviews:
AG.maximum(band)
11131.0
Now if I use GeoArray
using GeoData
raster = GDALarray("raster.tif") |> GeoArray
79607×46661×1 GeoArray{UInt32,3} with dimensions:
X: range(-177639.86776953447, stop=618420.1322304655, length=79607)
Projected: Ordered Regular Intervals crs: WellKnownText,
Y: range(3.380732533405694e6, stop=2.914132533405694e6, length=46661)
Projected: Ordered Regular Intervals crs: WellKnownText,
Band: 1:1 Categorical: Ordered
using Statistics
m = Int(maximum(raster))
49231
49231 is the correct maximum raster value computed outside Julia for QC
Can I get the true maximum value from ArchGDAL like
band.ComputeRasterMinMax()
in python?
Thanks!