mirror of
https://github.com/netbymatt/nexrad-level-2-plot.git
synced 2026-11-28 18:28:05 -08:00
disable preferred products for chunk mode
This commit is contained in:
1 parent
2017a6f4ff
commit
cab1556cc4
1 file changed
+6
-3
+6
-3
@@ -61,9 +61,12 @@ const draw = (data, _options) => {
|
||||
};
|
||||
|
||||
// check preferred waveforms
|
||||
const elevationInfo = data.vcp.record.elevations[options.elevation];
|
||||
const preferredProducts = preferredWaveformUsage[elevationInfo.waveform_type];
|
||||
if (options.usePreferredWaveforms && !preferredProducts.includes(options.product)) return false;
|
||||
const elevationInfo = data?.vcp?.record?.elevations?.[options?.elevation];
|
||||
// elevation info is not available in chunks mode, so preferred waveforms cannot be processed
|
||||
if (elevationInfo) {
|
||||
const preferredProducts = preferredWaveformUsage[elevationInfo.waveform_type];
|
||||
if (options.usePreferredWaveforms && !preferredProducts.includes(options.product)) return false;
|
||||
}
|
||||
|
||||
// calculate scale
|
||||
if (options.size > DEFAULT_OPTIONS.size) throw new Error(`Upsampling is not supported. Provide a size <= ${DEFAULT_OPTIONS.size}`);
|
||||
|
||||
Reference in new issue
Block a user