[gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark
Alex HighViz
alexhighviz at hotmail.com
Thu Jun 14 09:47:58 PDT 2018
Hi Mateusz,
Yes, I am aware of Boost.GIL, but perhaps didn't study it well enough when it became part of Boost. The section on usage on image views (http://boostorg.github.io/gil/develop/doc/html/design_guide.html#image-view) illustrates exactly the kind of flexibility I would like to have when working with geographical raster data, and is what motivates me in Pronto Raster. The image view concept in GIL serves exactly the same function as the raster concept in Pronto, but seems a bit more robust in adherence to standards.
I remember when looking at it at the time that I felt that using Boost.GIL would give me more difficulty than reward. I would have to make a lot of effort to wrap GDALRasterband's up to conform to GIL concepts and then would still need to implement the functionality that I was after then (generalized moving windows, i.e. convolutions, with a custom function, https://www.sciencedirect.com/science/article/pii/S0303243415300337 ). Now with hindsight, it is perhaps not that much *extra* work to allign Pronto's Raster View with GIL's Image View; it would put existing GIL features in scope and allow for the best of both worlds.
Have you looked at Pronto's gdal_raster_view class? It seems to meet most of the Image View requirement and might be of help when finishing the IO extension for GDAL.
Would you by any chance be able (and willing) to conjure up a simple example of "OUT = 3 * A + B * C" using Boost.GIL?
Thank you for your input.
Alex
p.s. I do remember a blog post or message on the boost mailing list by you saying how great it would be to have Boost.GIL compatible with GDAL.
-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net]
Sent: 14 June 2018 16:34
To: Alex HighViz <alexhighviz at hotmail.com>
Cc: gdal-dev at lists.osgeo.org; Hagen-Zanker AH Dr (Civil & Env. Eng.) <a.hagen-zanker at surrey.ac.uk>
Subject: Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark
On 14 June 2018 at 14:17, Alex HighViz <alexhighviz at hotmail.com> wrote:
>
> I few times I have posted to the list trying to promote the idea of
> providing iterators over pixels in a raster band , and more generally
> to make raster data accessible using (future) standard conforming ranges.
In case you are not aware, Boost.GIL provides such abstractions [1] It's not yet pure C++20 ranges, there will be at some point.
Although Boost.GIL design is a complex one, it's IMHO not trivial to beat its feature-completness, flexibility, extensibility and performance it can generate.
FYI, I have half-baked IO extension for GDAL.
I'm going to continue/finish it as soon as next Boost version is released which should include completely new version of IO layer.
Then, it can become another one to compare in your benchmark.
[1] http://boostorg.github.io/gil/develop/doc/html/design_guide.html
[2] https://lists.boost.org/boost-announce/2011/01/0281.php
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the gdal-dev
mailing list