Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Alex HighViz
Great, will try and let you know. From: Mateusz Loskot Sent: 15 June 2018 00:27:34 To: Alex HighViz Cc: Even Rouault; gdal-dev@lists.osgeo.org; Hagen-Zanker AH Dr (Civil & Env. Eng.) Subject: Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra ben

[gdal-dev] GDAL_GRID Linear: Segmentation Fault

2018-06-14 Thread Ian Reese
Hi Gdal, I am trying to do a linear interpolation using gdal_grid and I am getting a segmentation fault with output grid cell sizes smaller than 8m. gdal_grid -zfield "depth" -a linear:nodata=-32768 -outsize 526 754 -of GTiff -l inshape inshape.shp outtif.tif --config GDAL_NUM_THREADS ALL_CPUS

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Mateusz Loskot
On 15 June 2018 at 01:22, Alex HighViz wrote: > I need to look into sse2/ave2. My feeling is that will be easier > and more effective for the reference case than for Pronto, because pronto is > geared to express all operations at the pixel level. You may try with auto vectorization first (could b

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Alex HighViz
Thanks for the suggestions. These extra benchmarks should be feasible in the next week. Especially if I manage to get started properly with Google benchmark. I need to look into sse2/ave2. My feeling is that will be easier and more effective for the reference case than for Pronto, because pronto

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Mateusz Loskot
On 14 June 2018 at 18:47, Alex HighViz wrote: > Would you by any chance be able (and willing) to conjure up a simple example > of "OUT = 3 * A + B * C" using Boost.GIL? Quick update: out of the box, GIL provides related algorithm that accepts one or two sources: transform_pixels Here is example

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Mateusz Loskot
On 14 June 2018 at 18:47, Alex HighViz wrote: > I remember when looking at it at the time that I felt that using Boost.GIL > would give me more difficulty than reward. It is not easy indeed. Things had not been improved for long time, esp. documenation. It's changing and improving though. > I w

Re: [gdal-dev] gdalinfo -mm also report n (number of grid cells that are not nodata)

2018-06-14 Thread Even Rouault
> > Wanna take a crack at implementing this ? > > Too many API changes required, starting with GDALGetRasterStatistics(), > GDALComputeRasterStatistics() and all else following. There must be an > easier solution. But thanks for your offer:-) We don't necessary need to change the API. The functio

Re: [gdal-dev] gdalinfo -mm also report n (number of grid cells that are not nodata)

2018-06-14 Thread Markus Metz
On Wed, Jun 13, 2018 at 11:03 PM, Even Rouault wrote: > > On mercredi 13 juin 2018 22:14:07 CEST Markus Metz wrote: > > Many raster bands contain nodata, therefore it would be helpful if the > > number of non-nodata grid cells could be reported by gdalinfo in some way. > > > > The number of non-no

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Even Rouault
Hi, Interesting work. A few thoughts: - the benchmark_3_rasters_reference() could receive a few comments for non- advanced users to mention that it is correct only if all the rasters use Byte datatype, and all have the same block size. - It would be interesting to see a variant of this referen

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Alex HighViz
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

Re: [gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Mateusz Loskot
On 14 June 2018 at 14:17, Alex HighViz 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, Boos

Re: [gdal-dev] approximation quality of gcp transformation

2018-06-14 Thread Even Rouault
Martin, would you mind submitting your patch as a pull request against https://github.com/OSGeo/gdal so that regression tests and other quality checks are automatically passed ? Ideall you would do two commits: the first one with the bugfixes, and a second one with your improvements (would be f

[gdal-dev] approximation quality of gcp transformation

2018-06-14 Thread Martin.Franzke
Hi, motivated by the simple transformation to improve the quality of the TPS transformation I had a look at the polynomial counterpart. It turned out that the quality of the approximation not always improves with increasing order of the polynomial as it should be case. So I tried the same trick

[gdal-dev] Help with idiomatic GDAL solution for raster algebra benchmark

2018-06-14 Thread Alex HighViz
Dear all, 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. It would make implementing algorithms on raster data a lot more intuitive

Re: [gdal-dev] gdal_rasterize failing when trying multiband

2018-06-14 Thread Nunez, Mario
Anybody knows if this is possible? gdal_rasterize -a value -b $COUNT -tr $RESOLUTION -te $BBOX -a_nodata $NODATA -a_srs $EPSG PG:'host=localhost dbname=databio user=postgres password=postgres' -sql "SELECT ST_Centroid(g.geom), AVG($COLUMN) as value FROM $GRID g, $OBSERVACION o WHERE utc_date='$