Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagedelphi
titleinstructions.filter
linenumberstrue
set unpack=1;

set extractSubset=4;
set doExtractSubsets=1;
write;

set extractSubsetIntervalStart=3;
set extractSubsetIntervalEnd=8;
set doExtractSubsets=1;
write;


First of all the data section has to be decoded with the instruction at line 1. Setting the key extractSubset will specify the subset that is going to be extracted. In this example in line 3 we ask ecCodes to extract the 4th subset from the input file. The extraction is executed when the key doExtractSubset is set to 1 and the message containing only the 4th subset is written to the output file with the write instruction in line 5..

In the next example we extract all the subsets specifying an interval.

Code Block
languagedelphi
linenumberstrue
set unpack=1;
set extractSubsetIntervalStart=3;
set extractSubsetIntervalEnd=8;
set doExtractSubsets=1;
write;

Here we It is possible to extract all the subsets in an interval starting with the key extractSubsetIntervalStart and ending with the key extractSubsetIntervalEnd. In the example at lines 7 2 to 8 3 the request to extract all the subsets between the 3rd and the 8th (including the 3rd and the 8th) is expressed setting the two extractSubsetInterval keys. The extraction is performed when the key doExtractSubset is set to 1 and the resulting message containing the 6 subsets from the 3rd to the 8th from the original message are written to the output file.

...