Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Jukka Rahkonen
Jonathan Moules warwickshire.gov.uk> writes: > > I tried adding:  --config GDAL_CACHEMAX 270 but then it'd just > > crash with out-of-memory (it wouldn't actually stop at 27GB; so I guess > > that works differently again). > Crash (Windows dialog) or "clean" exit with a GDAL error messag

[gdal-dev] GetFeature() and attribute/spatial filters

2013-12-02 Thread Even Rouault
Hi, Frank noticed in http://trac.osgeo.org/gdal/ticket/5309 that the generic implementation of GetFeature(), which uses GetNextFeature() internally, did not respect its documented behaviour. It should have ignored any attribute or spatial filter, which it didn't up to http://trac.osgeo.org/gda

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Even Rouault
Le lundi 02 décembre 2013 19:42:59, Jonathan Moules a écrit : > On 2 December 2013 18:32, Even Rouault wrote: > > Le lundi 02 décembre 2013 19:12:07, Jonathan Moules a écrit : > > > Hi Even, > > > To hit the 10GB limit I'm using (Windows Server 2008): > > > > > > gdal_translate -of GTiff -co TILE

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Jonathan Moules
On 2 December 2013 18:32, Even Rouault wrote: > Le lundi 02 décembre 2013 19:12:07, Jonathan Moules a écrit : > > Hi Even, > > To hit the 10GB limit I'm using (Windows Server 2008): > > > > gdal_translate -of GTiff -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG > > -co JPEG_QUALITY=60 -co BLOCKX

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Even Rouault
Le lundi 02 décembre 2013 19:12:07, Jonathan Moules a écrit : > Hi Even, > To hit the 10GB limit I'm using (Windows Server 2008): > > gdal_translate -of GTiff -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG > -co JPEG_QUALITY=60 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co > PHOTOMETRIC=YCBCR 2000.vr

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Jonathan Moules
Hi Even, To hit the 10GB limit I'm using (Windows Server 2008): gdal_translate -of GTiff -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG -co JPEG_QUALITY=60 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co PHOTOMETRIC=YCBCR 2000.vrt 2000.tif I tried adding: --config GDAL_CACHEMAX 270 but then i

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Even Rouault
Le lundi 02 décembre 2013 18:49:42, Jonathan Moules a écrit : > Hi Even, > A further thought while we're on the issue of limits, it appears that gdal > (both gdal_translate and gdalwarp) have an internal limit of 10GB when > they're auto-allocating RAM. I'm not aware of such a limitation in the co

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Jonathan Moules
Hi Even, A further thought while we're on the issue of limits, it appears that gdal (both gdal_translate and gdalwarp) have an internal limit of 10GB when they're auto-allocating RAM. Assuming this is the case and it's not just coincidence, it might it be worth updating them to allow more use if a

Re: [gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Even Rouault
Le lundi 02 décembre 2013 17:17:11, Jonathan Moules a écrit : > Hi List, > I've just tried the following: > > call gdalwarp -of GTiff *-wm 13000* -co TILED=YES -co BIGTIFF=YES -co > COMPRESS=JPEG -co JPEG_QUALITY=80 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co > PHOTOMETRIC=YCBCR SP1937.tif SP1938.ti

[gdal-dev] -wm (memory in mb with gdalwarp)

2013-12-02 Thread Jonathan Moules
Hi List, I've just tried the following: call gdalwarp -of GTiff *-wm 13000* -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG -co JPEG_QUALITY=80 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co PHOTOMETRIC=YCBCR SP1937.tif SP1938.tif SP1939.tif 1.tif The documentation says: > -wm memory_in_mb: > Set the

Re: [gdal-dev] Using GDALWARP to crop to extremeties of source data

2013-12-02 Thread Etienne Tourigny
You can use gdal_translte with -projwin or -srcwin parameter On Tue, Nov 26, 2013 at 1:50 PM, JSz wrote: > I am using GDAL_grid to create a raster image using the command : > > *gdal_grid -a invdist:power=2:smoothing=0.001:radius1=0.0005:radius2=0.0005 > -of GTiff -zField a_field -ot Float64 -l

Re: [gdal-dev] how to aggregate an image to a lower resolution using gdal (gdalwarp?)

2013-12-02 Thread Etienne Tourigny
The "average" resampling mode of gdalwarp does "average resampling, computes the average of all non-NODATA contributing pixels". It was meant to compute the average of all the pixels in the "aggregation window". However, it may have issues in the corners. I am the author of the average and mode a

Re: [gdal-dev] how to aggregate an image to a lower resolution using gdal (gdalwarp?)

2013-12-02 Thread Etienne B. Racine
I've tried to dig this a bit. I couldn't understand the logic behind gdal aggregation (or downsampling). I've simplified your example using a smaller raster and deterministic values. Maybe someone could enlighten us by looking at the aggregation values ? Note that the lower right cells values were

Re: [gdal-dev] GDAL python tools and batch files

2013-12-02 Thread Jonathan Moules
Thanks Paul, that did it. I guess it's a python/batch file interaction thing. Cheers, Jonathan On 2 December 2013 11:51, Paul Meems wrote: > I think you should add 'call' at the begining of the command: > > http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/call.ms

Re: [gdal-dev] Locked files under Windows

2013-12-02 Thread Roger Bivand
On Mon, 2 Dec 2013, Even Rouault wrote: Le lundi 02 décembre 2013 11:22:11, Roger Bivand a écrit : On Tue, 5 Nov 2013, Roger Bivand wrote: On Tue, 5 Nov 2013, Even Rouault wrote: Even, Thanks as always for getting back quickly! Yes, the relevant code is (line 475 in rgdal/src/gdal-bindings.

Re: [gdal-dev] Locked files under Windows

2013-12-02 Thread Even Rouault
Le lundi 02 décembre 2013 11:22:11, Roger Bivand a écrit : > On Tue, 5 Nov 2013, Roger Bivand wrote: > > On Tue, 5 Nov 2013, Even Rouault wrote: > >>> Even, > >>> > >>> Thanks as always for getting back quickly! Yes, the relevant code is > >>> (line > >>> > >>> 475 in rgdal/src/gdal-bindings.cpp)

[gdal-dev] GDAL python tools and batch files

2013-12-02 Thread Jonathan Moules
Hi List, I'm trying to batch (Windows) a fairly simple task - mosaic and then pyramid some rasters. While testing, I've simplified my batch file down to two lines: gdal_merge -o %THIS_DIR%.tif -of GTiff -co TILED=YES -co BIGTIFF=YES -co > COMPRESS=JPEG -co JPEG_QUALITY=80 -co BLOCKXSIZE=512 -co B

Re: [gdal-dev] Locked files under Windows

2013-12-02 Thread Roger Bivand
On Tue, 5 Nov 2013, Roger Bivand wrote: On Tue, 5 Nov 2013, Even Rouault wrote: Even, Thanks as always for getting back quickly! Yes, the relevant code is (line 475 in rgdal/src/gdal-bindings.cpp): GDALDataset *pDataset = (GDALDataset *) R_ExternalPtrAddr(sxpHandle); if (pDataset