Include hips_data_range in HiPS property parser

This commit is contained in:
Philip Matsson
2026-04-17 10:04:58 +02:00
committed by Matthieu Baumann
parent 9392eddc36
commit 9afb07daa9
+14
View File
@@ -121,6 +121,18 @@ PropertyParser.hipsDataMinmax = function (properties) {
return [minData, maxData];
};
PropertyParser.dataRange = function (properties) {
let range =
properties &&
properties.hips_data_range &&
properties.hips_data_range.split(" ");
const minRange = range && parseFloat(range[0]);
const maxRange = range && parseFloat(range[1]);
return [minRange, maxRange];
};
PropertyParser.cutouts = function (properties) {
let cuts =
properties &&
@@ -547,6 +559,8 @@ export let HiPS = (function () {
self.dataMinMax = PropertyParser.hipsDataMinmax(properties);
self.dataRange = PropertyParser.dataRange(properties);
// HiPS3D special keywords
self.orderFreq = (properties && properties.hips_order_freq && +properties.hips_order_freq) || self.orderFreq;
self.tileDepth = (properties && properties.hips_tile_depth && +properties.hips_tile_depth) || self.tileDepth;