| Write Operator |
|
| Name: | Write |
| Full name: | org.esa.snap.core.gpf.common.WriteOp |
| Purpose: | Writes a data product to a file. |
| Version: | 1.3 |
It is used by the framework, e.g. the {@code gpt} command line tool, to write target products.
It may also be used by clients to write out break-point product files. This is done by placing a {@code WriteOp} node after any node in a processing graph:
<node id="anyNodeId">
<operator>Write</operator>
<sources>
<source>${anySourceNodeId}</source>
</sources>
<parameters>
<file>/home/norman/eo-data/output/test.nc</file>
<formatName>NetCDF</formatName>
<deleteOutputOnFailure>true</deleteOutputOnFailure>
<writeEntireTileRows>true</writeEntireTileRows>
<clearCacheAfterRowWrite>true</clearCacheAfterRowWrite>
</parameters>
</node>
Clients may also use this operator in a programmatic way:
WriteOp writeOp = new WriteOp(sourceProduct, file, formatName); writeOp.setDeleteOutputOnFailure(true); writeOp.setWriteEntireTileRows(true); writeOp.writeProduct(progressMonitor);
| Name | Description |
|---|---|
sourceProduct |
The source product to be written. |
| Name | Data Type | Default | Description | Constraints |
|---|---|---|---|---|
file |
File |
|
The output file to which the data product is written. | |
formatName |
String |
BEAM-DIMAP |
The name of the output file format. | |
deleteOutputOnFailure |
boolean |
true |
If true, all output files are deleted after a failed write operation. | |
writeEntireTileRows |
boolean |
false |
If true, the write operation waits until an entire tile row is computed. | |
clearCacheAfterRowWrite |
boolean |
false |
If true, the internal tile cache is cleared after a tile row has been written. Ignored if writeEntireTileRows=false. |