Hi, Very nice, seems that you both took the challenge very seriously. Now an advanced use case came into my mind, and it is about finding extreme values of sensor data within a polygon. Brute force method is to pre-process the raster and burn nodata into the exterior of the study area with gdal_rasterize by using the -i (invert) option. Can you suggest something more clever?
Right now I am just curious, but I guess that the QGIS Zonal statistics tool min/max option with additional x and y coordinate fields could make some users happy, or “gdal_minmax_location.py” with a -mask option. -Jukka Rahkonen- Lähettäjä: Nyall Dawson <nyall.daw...@gmail.com> Lähetetty: tiistai 5. marraskuuta 2024 2.51 Vastaanottaja: Even Rouault <even.roua...@spatialys.com> Kopio: Rahkonen Jukka <jukka.rahko...@maanmittauslaitos.fi>; 'gdal-dev@lists.osgeo.org' (gdal-dev@lists.osgeo.org) <gdal-dev@lists.osgeo.org> Aihe: Re: [gdal-dev] How to locate where the raster min and max values are? > > I would like to know the georeferenced coordinates of the min and max values > of a DEM file. Even better if I could forward them into a vector file. If the > minimum or maximum happens to be on a flat area like seabed I would be happy > with the first pixel at the moment. > > The task feels rather simple and I was sure that someone has already made an > utility or a QGIS plugin, but all I have found yet is for R I've submitted a processing tool for QGIS 3.42 to do this here: https://github.com/qgis/QGIS/pull/59332 . This uses Even's new GDAL api so should be super-efficient & fast to calculate. 🥳 Thanks for raising this interesting discussion, a lot of nice things have come out of this! Nyall
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev