I have Whitebox 3.3 and I am trying to export from the Whitebox GAT format to Geotiff. However, I do not see any tools to do this. I have the ExportGeoTIFF.groovy in the scripts folder, but when I run that script, I get "javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: name for class:".

Could somebody please help me understand how to convert my .dep files back to geotiff?

The data is Landsat imagery.


I'm afraid that you can't currently save a Whitebox Raster directly to a GeoTIFF from within Whitebox GAT (with a caveat below). The 3rd party Java-based GeoTIFF library that I use in Whitebox is admittedly quite old and limited in its functionality. However, exporting GeoTIFF files was something that I was interested in being able to support and so I started to write another open-source command-line program, called GoSpatial, to do exactly this (among other things). The source code, and instructions for how to use the tool, for GoSpatial can be found here. There are compiled versions available for Linux, Mac, and Windows (32 and 64-bit versions) found on the GoSpatial home page (first link). Briefly however, you simply need to open the terminal (command prompt on Windows), change the directory to the location of the GoSpatial executable file, then type the following command:

./go-spatial -run="whitebox2geotiff" -args="/path/to/input.dep;/path/to/output.tif"

Obviously you need to change the file names to match your case.

Here is the caveat: You can actually access the GoSpatial library to export GeoTIFF files directly from Whitebox GAT. If you open the Scripter in Whitebox, you'll see that there is a tool available (though hidden from users) called ExportGeoTIFF. It's still quite experimental but you can probably get it to work. First, you need to paste a copy of the GoSpatial executable file to the Whitebox/resources/plugins directory. Then uncomment the lines in the script (36-39):

//def name = "ExportGeoTIFF"
//def descriptiveName = "Export GeoTIFF"
//def description = "Exports a Whitebox GAT Raster to GeoTIFF format (.tif)"
//def toolboxes = ["IOTools"]

so that they read:

def name = "ExportGeoTIFF"
def descriptiveName = "Export GeoTIFF"
def description = "Exports a Whitebox GAT Raster to GeoTIFF format (.tif)"
def toolboxes = ["IOTools"]

This will make the script visible to Whitebox as a plugin tool and when you re-launch Whitebox, you should find that there is a new ExportGeoTIFF tool available in the Data Import/Export toolbox. I hope that helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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