exportToFiles method
Export the BooleanField to a file in geoTIFF format.
This enables a BooleanField to be saved, persisted, and shared.
Regardless of the original data format:
- A BooleanField is always exported as 2-bit unsigned integer data
- A value of 2 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 BooleanField from a file created by this method, use BooleanField.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.