I am attempting to run the following code from WhiteboxTools:

.\whitebox_tools.exe --run="LeeFilter" --input='imagery_HV_orig.tif' --output='imagery_HV_filtr.tif' --filterx=5 --filtery=5 --sigma=10.0 -m=5.0 -v

I am using the MDA sample radarsat-2 imagery (Wide_2_HH_HV_SGX). The images are about 288 MB each and I am processing the files one at a time.

The resulting rasters produced by the script are all nan values. I am able to successfully run the same script using smaller subsets of data. Does the Lee filter have a maximum file size?

I am running windows 7

EDIT: The metadata get all screwed up as well:

gdalinfo metadata after running WBT Lee Filter

  • 1
    Thanks for the code. I tested it on the sample files, both HH and HV, and it worked for me. I have no idea what went wrong when you tested it.
    – Kazuhito
    Dec 18, 2018 at 4:04
  • Did you do any transformation of the images? Reprojection? Or just straight out-of-the box. I also notice that the output file metadata is screwed up (I will post a screenshot). Also, what version of whiteboxtools are you using? Dec 18, 2018 at 16:39
  • 2
    My primary test was only on the downloaded sample file as-is. Today I reprojected imagery_HV.tif to UTM 10N and WhiteBoxTools lee-sigma worked on it alright. I noticed the filesize you had was 288 MB while it is 451 MB on my disk. The gdalinfo returns valid coordinates. Could the issue come from error in the data?
    – Kazuhito
    Dec 19, 2018 at 4:54
  • I noticed that the file size was different. I think perhaps I linked to the wrong images ( SLC instead of SSG). However, I downloaded the ones I linked to (SLC) and tried again with the same result. When I run gdalinfo on the original dataset, I don't have any of the #IND, #INF, #IO, #J values in the output, and the data display properly in QGIS. Dec 19, 2018 at 21:10
  • 1
    Got that. Perhaps you can edit the link to the data you had intended to. BTW it is not unusual QGIS displays Radarsat, Sentinel-1, etc. properly as it assumes WGS84 as default. If you try to display it by other softwares, eg SAGA, you would commonly see its mirror image (I mean the West and East are swapped) and the orientation is ignored.
    – Kazuhito
    Dec 19, 2018 at 23:02

1 Answer 1


I was able to narrow down the cause of the issue that you encountered with the set origin point of the grid. It seems that your GeoTIFF was of a format where the coordinate system was provided by multiple tie points contained within the ModelTiePoint tag (33922) and the ModelPixelScale tag (33550) was not specified. This is commonly the case for raster that require rubber-sheeting. Nonetheless, WhiteboxTool's GeoTIFF decoder was not previously designed to handle this scenario.

As of WhiteboxTools v0.13, support has been added for reading GeoTIFFs that have coordinate transformations defined by multiple tiepoints contained with the ModelTiepointTag (Tag 33922). These rasters have their raster-to-model transform defined by a 2D polynomial regression of the 3rd order. Furthermore, the WhiteboxTools abstract raster model now transfers information contained in an input GeoTIFF's ModelTiePoint, ModelPixelScale, ModelTransform, GeoKeyDirectory, GeoDoubleParms, and GeoAsciiParams tags directly to the output raster. I have tested version 0.13 with your sample data and the error no longer persists.

  • 1
    I'm glad to hear that it worked for you. Jan 24, 2019 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.