//script for Information value method // required parameters: %1 = name of the factor map, which should be a class map del active%1.* -force del %1w.* -force //calculation in cross table Active%1.tbt := TableCross(%1,active,IgnoreUndefs) Calc Active%1.tbt //Calculate the area of landslides in the crosstable only for the combinations with landslides Tabcalc Active%1 AAct:=iff(active=1,Area,0) //create an attribute table crtbl %1w %1 //calculate the total area of landslides within each class of the factor map Tabcalc %1w Areaclassact:= ColumnJoinSum(Active%1.tbt,AAct,%1,1) //calculate the total area of the class of the factor map Tabcalc %1w Areaclasstot:= ColumnJoinSum(Active%1.tbt,Area,%1,1) //calculate the total area of landslides in the map Tabcalc %1w Areaslidetot:= ColumnJoinSum(Active%1.tbt,AAct,,1) //calculate the total area of the map Tabcalc %1w Areamaptot:= ColumnJoinSum(Active%1.tbt,Area,,1) //calculate the density of landslides in the class Tabcalc %1w dclass { vr=::0.000001}:=Areaclassact/Areaclasstot //correcting for those areas that have no landslides Tabcalc %1w densclass { vr=::0.000001}:= iff((isundef(dclass))or(dclass=0), 0.000001, dclass) //calculate the density of landslides in the map Tabcalc %1w densmap { vr=::0.000001}:=Areaslidetot/Areamaptot //calculate the weight Tabcalc %1w weight:=ln(densclass/densmap) //generating the weight map active%1:= MapAttribute(%1,%1w.tbt.weight) Show active%1.mpr