Je ne sais pas de quel type d'interpolation vous parlez, mais si la moyenne de tous les voisins sera bonne, cela pourrait être la solution:
create table hex_grid_data_av as
(
select gid, wkb_geometry, value,
case
when value > 0 then value
else (select sum(h2.value)/6 from hex_grid_data h2 where ST_Touches(h1.wkb_geometry, h2.wkb_geometry))
end as int_value
from hex_grid_data h1
)
Ou suivre @MakinFlippyFloppy doute si vraiment 0 dans l'exemple signifie null (aucune valeur):
create table hex_grid_data_av as
(
select gid, wkb_geometry, value,
case
when value > 0 then value
else (select sum(coalesce(h2.value,0))/6 from hex_grid_data h2 where ST_Touches(h1.wkb_geometry, h2.wkb_geometry))
end as int_value
from hex_grid_data h1
)
Ou si les valeurs nulles ou nulles ne doivent pas diminuer la moyenne:
create table hex_grid_data_av as
(
select gid, wkb_geometry, value,
case
when value > 0 then value
when value = 0 and not exists (select 1 from hex_grid_data h2 where ST_Touches(h1.wkb_geometry, h2.wkb_geometry) and h2.value != 0 and h2.value is not null ) then 0
else (select sum(coalesce(h2.value,0))/(select count(nullif(value,0)) from hex_grid_data h3 where ST_Touches(h1.wkb_geometry, h3.wkb_geometry) ) from hex_grid_data h2 where ST_Touches(h1.wkb_geometry, h2.wkb_geometry))
end as int_value
from hex_grid_data h1
)