Method ExportToFilesAsync
ExportToFilesAsync(string, string, CancellationToken)
Exports the ContinuousField 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 ContinuousField to be saved, persisted, and shared.
Regardless of the original data format:
- A ContinuousField is always exported as 32-bit floating point data
- A value of -3e38F 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. The decision to save a field as multiple files is automatic
and depends on the amount of information contained within 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 ContinuousField 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
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET | 300 |
| .NET Windows | 300 |
| .NET Android | 300 |
| .NET iOS | 300 |