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

Alan Snow alansnow21 at gmail.com
Mon Dec 27 11:20:00 PST 2021


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.

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

> Hi list!
>
> I'm very new to GDAL, so please excuse me if the question is too simple...
>
> My problem: I'm writing an App to fly VFR and I'd like to display a
> vertical profile of the route.
> Of course, it must work offline, so I cannot use a service like Google
> Maps or similar...
>
> I tryed OpenTopoData with the EUDEM dataset and I can get the elevation
> from a single point.
> Very nice, but not useful for my App...
>
> Since I don't need a huge precision, but I do need a relative small file
> to use in my App, it may suffice if I can create a database with the
> maximum elevation in a square 5x5 km, identified by the coordinates of
> the center.
>
> And here start the problems, since I don't have any idea how to extract
> these data from the TIFF files I have.
>
> On the server (Debian 10) is Python and PERL installed, as well as the
> GDAL utilities.
>
> Can someone help me?
>
> Thank you very very much for your help!
> 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/65ea4fe2/attachment.html>


More information about the gdal-dev mailing list