Closed Skerre closed 1 year ago
Hi Martin, -how it's working now- a) We are using the function 'lookupforgrayindex()' for Popup (clicking on map, №1). This function in 'BetterWMSTileLayer.js': const lookupforgrayindex =(GRAY_INDEX => { switch (true) { case GRAY_INDEX > 0.9: return 'Very High'; case GRAY_INDEX > 0.7: return 'High'; case GRAY_INDEX > 0.55: return 'Medium'; case GRAY_INDEX > 0.25: return 'Low'; case GRAY_INDEX > 0: return 'Very Low'; default: return 'Undefined'; } }); b) For Legend we are using the function 'getWordExplanation()' (activated by SideBar button, №2). This function in 'NewLegend_2.js': const getWordExplanation = (index => { switch (index) { case 0: return 'Very Low'; case 1: return 'Low'; case 2: return 'Middle'; case 3: return 'High'; case 4: return 'Very High'; default: return 'Not defined'; } }) -end-
Martin, I can do both options, but I think we just need to decide what we are really want to see real number or 0-1. The biggest advantage of real number I can to convert them in 0-1 at anytime. So I would choose the real numbers. After we make decision, I will make the same description/algorithm/code of data for Popup and Legend.
Should we implement a mechanism to give it other options? Or should I remake all layers and transform them to 0-1 range so we dont need that lookup table ?
Currently, when querying the cell value of a geodatalayer, we are using this lookup table to give it "high" "low" etc. Should we implement a mechanism to give it other options? Or should I remake all layers and transform them to 0-1 range so we dont need that lookup table ?