lue_calculate for one-off computations

Sometimes you may want to quickly compute some new result based on existing datasets, maybe just for visualization purposes, or to test an idea. Creating a new C++ program or Python script may feel like a lot of work for such a simple task. For that we have created the lue_calculate command. It allows you to execute an assignment statement which you pass on the command-line, and it will do everything needed to finish the computations as quickly as possible. By default, lue_calculate will use all CPU cores available, but this can be configured by passing additional arguments. Here are two examples:

lue_calculate 'slope.tif = slope("$MY_DATA/elevation.tif", 100.0)'
lue_calculate 'flux, state = accu_threshold("flow_direction", "material", "threshold")'

As you can see, the command supports expanding environment variables (on Windows, %VARIABLE% is also expanded), multiple return values, and default file extensions. Nested expressions are also supported. The one limitation is that only a single assignment statement can be passed to the command. If you need more, then you can still write a C++ or Python program, of course.

The lue_calculate command will be part of the upcoming 0.3.8 release.

For more details, execute lue_calculate --help and see the LUE documentation.