[gdal-dev] Get max elevation on "squares"

Alan Snow alansnow21 at gmail.com
Mon Dec 27 19:54:28 PST 2021


After some thought, you may achieve what you want by resampling the file to
a 5km grid size with the Resampling.max option:

https://rasterio.readthedocs.io/en/latest/topics/resampling.html

https://rasterio.readthedocs.io/en/latest/api/rasterio.enums.html#rasterio.enums.Resampling.max

You can then store the centroid of the grid cell and the value in a
database.

On Mon, Dec 27, 2021, 1:45 PM Luca Bertoncello <lucabert at lucabert.de> wrote:

> Am 27.12.2021 um 20:20 schrieb Alan Snow:
>
> Hi Alan,
>
> thank you very much for your answer!
>
> > You may be looking for clip/mask:
> >
> >
> https://rasterio.readthedocs.io/en/latest/topics/masking-by-shapefile.html
> >
> > https://corteva.github.io/rioxarray/stable/examples/clip_geom.html
> >
> > After clipping, you can use numpy to do the sum.
>
> As I sayd, I'm really new to GDAL.
> I just have these TIFF-files and can't unterstand, from the pages you
> linked, how can I split alle these files in little tiles of a given size.
> Maybe can you give me an example?
>
> Thanks a lot
> Luca Bertoncello
> (lucabert at lucabert.de)
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211227/60b6ace2/attachment.html>


More information about the gdal-dev mailing list