@@ -248,35 +248,19 @@ def _compute_legend_html(self):
248248 rec .legend_html = ""
249249
250250 def _get_indicator_values (self ):
251- """Get indicator values from spp.hxl.area.indicator .
251+ """Get area-level indicator values for this layer's variable/period/incident .
252252
253253 Returns:
254254 list: List of float values
255+
256+ TODO(remove-hxl): The area-indicator data source (spp.hxl.area.indicator,
257+ formerly provided by spp_hxl_area) has been removed. Until a replacement
258+ source is wired in, no indicator data is available and this returns an empty
259+ list, which disables indicator-driven break and color computation. See
260+ internal plan remove-hxl-modules.md.
255261 """
256262 self .ensure_one ()
257-
258- if not self .variable_id :
259- return []
260-
261- # Build domain for indicator search
262- domain = [
263- ("variable_id" , "=" , self .variable_id .id ),
264- ]
265-
266- if self .period_key :
267- domain .append (("period_key" , "=" , self .period_key ))
268-
269- if self .incident_id :
270- domain .append (("incident_id" , "=" , self .incident_id .id ))
271-
272- # Search indicators
273- Indicator = self .env ["spp.hxl.area.indicator" ]
274- indicators = Indicator .search (domain )
275-
276- # Extract values
277- values = [ind .value for ind in indicators if ind .value is not False ]
278-
279- return values
263+ return []
280264
281265 @staticmethod
282266 def _compute_quantile_breaks (values , num_classes ):
@@ -346,59 +330,11 @@ def get_feature_colors(self, area_ids):
346330
347331 Returns:
348332 dict: Mapping of area_id (int) to color (str)
333+
334+ TODO(remove-hxl): The area-indicator data source (spp.hxl.area.indicator,
335+ formerly provided by spp_hxl_area) has been removed. Until a replacement
336+ source is wired in, there is no per-area indicator data to colorize, so this
337+ returns an empty mapping. See internal plan remove-hxl-modules.md.
349338 """
350339 self .ensure_one ()
351-
352- if not self .variable_id or not self .color_scale_id :
353- return {}
354-
355- # Build domain for indicator search
356- domain = [
357- ("variable_id" , "=" , self .variable_id .id ),
358- ("area_id" , "in" , area_ids ),
359- ]
360-
361- if self .period_key :
362- domain .append (("period_key" , "=" , self .period_key ))
363-
364- if self .incident_id :
365- domain .append (("incident_id" , "=" , self .incident_id .id ))
366-
367- # Search indicators
368- Indicator = self .env ["spp.hxl.area.indicator" ]
369- indicators = Indicator .search (domain )
370-
371- if not indicators :
372- return {}
373-
374- # Get breaks and colors
375- if not self .break_values :
376- return {}
377-
378- breaks = json .loads (self .break_values )
379- colors = self .color_scale_id .get_colors ()
380-
381- if not colors :
382- return {}
383-
384- # Build color mapping
385- color_map = {}
386- num_classes = len (breaks ) + 1
387- num_colors = len (colors )
388-
389- for ind in indicators :
390- if not ind .value and ind .value != 0 :
391- continue
392- # Determine which class this value falls into
393- class_idx = 0
394- for i , break_val in enumerate (breaks ):
395- if ind .value >= break_val :
396- class_idx = i + 1
397- else :
398- break
399-
400- # Map class to color
401- color_idx = int ((class_idx / max (num_classes - 1 , 1 )) * (num_colors - 1 ))
402- color_map [ind .area_id .id ] = colors [color_idx ]
403-
404- return color_map
340+ return {}
0 commit comments