6.2. Binary Writer¶
The Binary writer writes band data to a flat binary file.
By default it enhances the data based on the enhancement configuration file
and then saves the data to a flat binary file. The output data type will match
the input data for integer types (ex. uint8 -> uint8), but floating point types
will always be forced to 32-bit floats for consistency between readers and
changes in the low-level Satpy library. A different output type can be
specified using the --dtype flag. To turn off scaling of the data (a.k.a.
enhancements) the --no-enhance command line flag can be specified to write
the “raw” band data.
Warning
Starting in Polar2Grid 3.2.0, output filename “data_type” fields now follow numpy-style naming.
For example, 32-bit floats are now “float32” instead of “real4”.
Unsigned 8-bit integers are now “uint8” instead of “uint1”.
The dtype passed to the --dtype flag is unchanged (numpy style).
6.2.1. Command Line Arguments¶
usage: polar2grid.sh -r <reader> -w binary [-h] [--output-filename FILENAME] [--dtype {uint8,uint16,uint32,uint64,int8,int16,int32,int64,float32,float64}] [--no-enhance]
[--fill-value FILL_VALUE]
6.2.1.1. Binary Writer¶
- --output-filename
Custom file pattern to save dataset to
- --dtype
Possible choices: uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, float64
Data type of the output file (8-bit unsigned integer by default - uint8)
- --no-enhance
Don’t enhance the data before saving it
Default:
True- --fill-value
Replace invalid values with the specified value. Floating-point products typically use NaN while integer fields will use 0 or the max value for that data type.