Show / Hide Table of Contents

Method ExportToFilesAsync

ExportToFilesAsync(string, string, CancellationToken)

Export the BooleanField to files in geoTIFF format.

Declaration
public Task<IReadOnlyList<string>> ExportToFilesAsync(string outputDirectory, string filenamesPrefix, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string outputDirectory

The location of the exported files.

string filenamesPrefix

The filename prefix of the exported files.

CancellationToken cancellationToken

A cancellation token that can be used to cancel the operation.

Returns
Type Description
Task<IReadOnlyList<string>>

The paths of saved geoTIFF files, or an error if file export is unsuccessful.

Remarks

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 files

Small spatial fields are saved as a single file named outputDirectory/filenamesPrefix.tiff. Large spatial fields will be saved as multiple files using the following naming convention: outputDirectory/filenamesPrefix_0.tiff, outputDirectory/filenamesPrefix_1.tiff, ..., outputDirectory/filenamesPrefix_N.tiff. Whether a field is saved as multiple files depends on the amount of information contained by the field and the memory resources available on the host device. The .tiff extension is automatically appended to each file name.

The output directory is expected to exist and have appropriate write permissions. There should be no existing files at the export location.

To read a BooleanField from files created by this method, use CreateAsync(IEnumerable<string>, int, SpatialReference?, CancellationToken) with the paths returned from this method and a band identifier of 0.

Throws an exception if file export is unsuccessful.

See Also
CreateAsync(IEnumerable<string>, int, SpatialReference, CancellationToken)

Applies to

Platforms and versions
TargetVersions
.NET300
.NET Windows300
.NET Android300
.NET iOS300
In this article
Provide feedback
Back to top Copyright © 2025 Esri.