Re: [gdal-dev] Way to increase global LRU cache of the /vsis3/ driver

2017-06-13 Thread Even Rouault
On mardi 13 juin 2017 08:24:59 CEST teeschke wrote: > Dear GDAL Devs, > > the vsis3 driver truly is a masterpiece of a driver!! > http://www.gdal.org/cpl__vsi_8h.html#a5b4754999acd06444bfda172ff2aaa16 > > I just wonder if there is any possibility to increase the global LRU cache > which has a fix

[gdal-dev] Way to increase global LRU cache of the /vsis3/ driver

2017-06-13 Thread teeschke
Dear GDAL Devs, the vsis3 driver truly is a masterpiece of a driver!! http://www.gdal.org/cpl__vsi_8h.html#a5b4754999acd06444bfda172ff2aaa16 I just wonder if there is any possibility to increase the global LRU cache which has a fixed size of 16MB. In my use-case I have time-related Gribfiles, st

[gdal-dev] Calling GDAL directly from within Python

2017-06-13 Thread Siebe Bosch
Dear list, Below you will find a question from my intern Bram. Unfortunately I could not help him out either since I only use the gdal executables. We would highly appreciate your help calling GDAL functions from within Python. Kind regards, Siebe Bosch Hi devs, This is my first time using t

Re: [gdal-dev] Raster calculation optimalisation

2017-06-13 Thread Jan Heckman
Maybe it does not compile the formula but runs parser etc. as a kind of interpreter at each function call. Googled and saw http://beltoforion.de/article.php?a=muparsersse. Did not try, so no recommendation, let alone guarantee ;) You could check by defining a test function explicitly, if it is much

Re: [gdal-dev] Raster calculation optimalisation

2017-06-13 Thread Damian Dixon
​Hi Paul, I can only do snippets in C++... You can get the block size using: poBand->GetBlockSize( &nBlockXSize, &nBlockYSize ); then do a read something like: for(int band = 0; band AdviseRead(startX+xoffset,startY+yoffset,blockWidth,blockHeight,blockWidth,blockHeight,GDT_Int32, NULL);

Re: [gdal-dev] Clip tiff with shapefile

2017-06-13 Thread Paul Meems
To answer my own question: GdalWarp is smart enough to internally reproject if needed. So I can use my tiff in UTM and my border in 28992 and I get a perfectly clipped output. Paul *Paul Meems * Release manager, configuration manager and forum moderator of MapWindow GIS. www.mapwindow.org Own

Re: [gdal-dev] Raster calculation optimalisation

2017-06-13 Thread Damian Dixon
Hi Paul, What is the time to run your code without applying the calculation to each pixel? It is usually better to process the pixels in a block rather than walking across each row especially if you are processing a TIFF as these are usually stored as tiles (blocks). The crossing from C# to C++

[gdal-dev] Raster calculation optimalisation

2017-06-13 Thread Paul Meems
I'm using GDAL v2.1.3 with the SWIG bindings in my custom C# application. I've created a method to do some calculation of my raster file: public bool GdalCalculate(string input, string output, string formula, double? minValue = null) { if (!File.Exists(input)) throw new FileNotFoundEx