Getting the most out of Whitebox GAT

Have you been running into out-of-memory errors with Whitebox and are a bit confused because you have 8-16GB of memory in your computer? My guess is you’re running Microsoft Windows and the good news is there’s a solution to your problems. The default Java Runtime Environment (JRE) for download on the Oracle site for computers running Microsoft Windows OS is the 32-bit version even if you are running a 64-bit version of the operating system. This will severely limit the amount of memory that Whitebox can access. In fact, working with 32-bit Java will limit the memory that any Java program on your computer will see, but because Whitebox is used to process large spatial files, it’s particularly problematic for Whitebox users. The 32-bit version only allows Java to see about 1.1GB of your RAM which doesn’t give you much room to play with that wonderful satellite image or LiDAR file, does it? This can affect performance and can lead to out-of-memory errors when handling large files. Given the large number of Windows users, this affects many people (I’ll point out here that there is only a 64-bit version of Java for Mac OSX so this same problem simply doesn’t occur).

You can check what version of the JRE Whitebox is running under by selecting Options and Settings under the View menu.

Whitebox Options and Settings

Options and Settings in Whitebox

You can actually be running multiple versions of the Java runtime on your computer at the same time, so you really have to check this in Whitebox to find out which version it is running on. If you are running the 32-bit version on a 64-bit computer it would be advisable to upgrade your Java to the 64-bit version. On the Oracle Java download site, the default version of Java for Windows is 32-bit, so you’ll need to explicitly select the 64-bit version. You want the version that ends with -windows-x64.exe rather than the 32-bit version which ends with -windows-i586.exe. Now uninstall that old 32-bit version (make sure that no other programs require it first and also make sure that Whitebox is closed before you uninstall Java) and install the new 64-bit version. Launch Whitebox again and check under the Options and Settings menu to see that you have a reasonable heap size size and that you’re using 64-bit Java. You should find that you have considerably more room to play around with those massive files now. It’s like moving into a mansion after having lived for years in a one-bedroom apartment…what will you do with all that new room? I hope you use it to do some wonderfully exciting geospatial analysis 😉


John Lindsay


2 thoughts on “Getting the most out of Whitebox GAT

  1. William Lidberg says:

    I am working with hydrological modelling and normally use saga gis, qgis, grass and mostly arcgis but I have to say that Whitebox is simply brilliant! The detailed descriptions for each tool is extreamly helpfull. I have a rather powerful computer with lots of ram and a multicore processor (I7-4770k). How do whitebox handle multiple processor cores? can the process be devided over several cores/threads?

    Thanks for making whitebox!

    • Hi William,

      I’m glad that you have enjoyed using Whitebox GAT. Regarding your parallel processing question, tools that involve algorithms that are inherently concurrent have generally been written in a way that takes advantage of your multiple cores. There are plenty of examples of tools that use parallel processing in Whitebox including Average Overlay, Correct Vignetting, User-Defined Weights Filter, IDW Interpolation (LiDAR), and many others. If there is a tool that you think can be modified to take advantage of parallel processing, take a look at the code for these existing parallel tools and see if you can modify the tool you are interested in. If you’re successful then be sure to forward you modifications to me so everyone can benefit! However, parallel processing is tricky stuff and not all algorithms lend themselves to it naturally. Nonetheless, if you’re running a single tool many, many times in a batch workflow and would benefit from doing so in parallel, then I would suggest you look into the ‘Run Plugin In Parallel’ tool available in v. 3.0.2. Using this tool, you can specify any existing plugin tool and a text file to drive the operation. Each line in the input text file provides the arguments for the tool for one run. It will automatically figure out how many processors your computer has available and send each process a run of the tool and then you’ll hear all your cores humming away contently. I’ve tested this out with several very large workflows and it’s cut my processing time down considerably. Best wishes and happy geoprocessing.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s