exportToFiles method
Export the DiscreteField to a file in geoTIFF format.
This enables a DiscreteField to be saved, persisted, and shared.
Regardless of the original data format:
- A DiscreteField is always exported as 32-bit signed integer data
- A value of -2147483647 is used to represent NoData in the exported file
Spatial fields are saved as a single file named outputDirectory/filenamesPrefix.tiff. The .tiff extension is automatically appended to the file name.
The output directory is expected to exist and have appropriate write permissions. There should be no existing file at the export location.
To read a DiscreteField from a file created by this method, use DiscreteField.createFromFiles with the path returned from this method and a band identifier of 0.
Export operations may take longer for fields evaluated in multiple, smaller processing areas from ContinuousFieldFunction.evaluate.
An error is returned if file export is unsuccessful.
Parameters:
outputDirectory— The location of the exported file.filenamesPrefix— The filename prefix of the exported file.
Return Value: An array containing a single path to the saved geoTIFF file, or an error if file export is unsuccessful.