[gdal-dev] More info on gdalwarp resampling methods?

Matt.Wilkie at yukon.ca Matt.Wilkie at yukon.ca
Wed Mar 31 09:46:46 PDT 2021


It looks like my knack for stumbling into weird edge cases is still alive and well! Whee.

I'm using gdal from Qgis v3.16 on Windows.

I was trying the (mode,max,min,med) resampling methods and get the error reliably with `mode`. I thought I got it on a 2nd or 3rd method also but didn't repeat that this morning. I've been playing with GDAL_CACHEMAX and -wm numbers so that might be a factor.

Working directory is a local SSD drive and there is 32 GB physical memory, generally 50% or more free. Free drive space is on the low end, 10 GB on C: and 7 GB on D:, where the working folder is.

~~~
gdalwarp ^
--config GDAL_CACHEMAX 4096 ^
-wm 512 ^
-multi ^
-co TILED=YES ^
-co COMPRESS=ZSTD ^
-t_srs EPSG:3579 ^
-r mode ^
-co predictor=2 ^
tri_mergedDEM_clipped_16bit.tif ^
tri_mergedDEM_clipped_16bit_ytalb-rs-mode.tif
~~~

Console:
~~~
$ gdalwarp --config GDAL_CACHEMAX 4096 -wm 512 -multi -co TILED=YES -co COMPRESS=ZSTD -t_srs EPSG:3579 -r mode -co predictor=2 tri_mergedDEM_clipped_16bit.tif tri_mergedDEM_clipped_16bit_ytalb-rs-mode.tif
Creating output file that is 89772P x 73148L.
Processing tri_mergedDEM_clipped_16bit.tif [1/1] : 0Using internal nodata values (e.g. -99) for image tri_mergedDEM_clipped_16bit.tif.
Copying nodata values from source tri_mergedDEM_clipped_16bit.tif to destination tri_mergedDEM_clipped_16bit_ytalb-rs-mode.tif.
..ERROR 1: Failed to acquire WarpMutex in WarpRegion().
.
~~~

The info report for source image is attached, which can be downloaded from https://sft.gov.yk.ca/link/gV2K9F4PyH1PTJLQH8fy99  until April 14. (500mb).


-Matt

From: Even Rouault <even.rouault at spatialys.com>
Sent: March 30, 2021 11:39 PM
To: Matt.Wilkie <Matt.Wilkie at yukon.ca>; gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] More info on gdalwarp resampling methods?


Matt,

(leaving out a bit your general question) The below looks is an error unrelated to whatever resampling method you apply. This is completely unfamiliar though. Do you build GDAL yourself ? Did you disable threading at build time ? Or maybe you're enabling threading with a huge number of threads ? Does that happen all the time ?

Even
Background: I'm getting error messages when trying to use some of the methods with 16bit imagery and I don't know if I'm seeing a gdal bug, a data bug, or just "you can't use that method with this raster type".

ERROR 1: Failed to acquire WarpMutex in WarpRegion().

Thanks!

Matt Wilkie
Geomatics Analyst
Environment | Technology, Innovation and Mapping
T 867-667-8133 | Yukon.ca<https://imsva91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fyukon.ca&umid=AC1EC954-BECF-5E05-B6CB-AE995C90C7E2&auth=c132af8ee7c9d1278d61a701569070a095ce962e-90d4f63b9d26941043d059b2a373176c1c6f200f>
Hours: 08:30-16:30, Tue-Wed: Office, Thu-Fri: Remote.
 _______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com<https://imsva91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fwww.spatialys.com&umid=AC1EC954-BECF-5E05-B6CB-AE995C90C7E2&auth=c132af8ee7c9d1278d61a701569070a095ce962e-76fdcd2f1d6f12f56ce5a5d39e4c63f2993393ad>

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210331/8dbf7f1f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tri_mergedDEM_clipped_16bit.tif.info
Type: application/octet-stream
Size: 1769 bytes
Desc: tri_mergedDEM_clipped_16bit.tif.info
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210331/8dbf7f1f/attachment-0001.obj>


More information about the gdal-dev mailing list