@@ -1408,7 +1408,7 @@ def e4mstp(dem, resolution, default: rvt.default.DefaultValues = rvt.default.Def
14081408 svf_arr = svf_temp ["svf" ].squeeze ()
14091409 neg_opns_arr = default .get_neg_opns (dem , resolution ).squeeze ()
14101410
1411- # For SVF 2 (FLAT)
1411+ # For SVF 2 (FLAT) # TODO: svf_r_max is in pixels, take into account the resolution
14121412 default_2 = rvt .default .DefaultValues ()
14131413 default_2 .svf_r_max = 20
14141414 default_2 .svf_noise = 3
@@ -1437,14 +1437,14 @@ def e4mstp(dem, resolution, default: rvt.default.DefaultValues = rvt.default.Def
14371437 # 3) Comb openness LD
14381438 comb_ol = rvt .blend .BlenderCombination ()
14391439 comb_ol .create_layer (
1440- vis_method = "Openness difference" , normalization = "Value" ,
1441- minimum = - 15 , maximum = 15 ,
1440+ vis_method = "Openness difference" ,
1441+ normalization = "Value" , minimum = - 15 , maximum = 15 ,
14421442 blend_mode = "normal" , opacity = 50 ,
14431443 image = (opns_arr - neg_opns_arr )
14441444 )
14451445 comb_ol .create_layer (
1446- vis_method = "Local dominance" , normalization = "Value" ,
1447- minimum = 0.5 , maximum = 1.8 ,
1446+ vis_method = "Local dominance" ,
1447+ normalization = "Value" , minimum = 0.5 , maximum = 1.8 ,
14481448 blend_mode = "normal" , opacity = 100 ,
14491449 image = ld_arr
14501450 )
@@ -1456,11 +1456,7 @@ def e4mstp(dem, resolution, default: rvt.default.DefaultValues = rvt.default.Def
14561456 comb_opns_ld_arr = comb_opns_ld_arr .astype ("float32" )
14571457
14581458 # 4) Coloured slope
1459- slope_arr = rvt .vis .slope_aspect (
1460- dem = dem ,
1461- resolution_x = resolution ,
1462- resolution_y = resolution ,
1463- )["slope" ]
1459+ slope_arr = rvt .vis .slope_aspect (dem = dem , resolution_x = resolution , resolution_y = resolution )["slope" ]
14641460 # ------------------------------------------------------------------------------------------------------------------
14651461
14661462 # Prepare layers for blending
@@ -1484,8 +1480,8 @@ def e4mstp(dem, resolution, default: rvt.default.DefaultValues = rvt.default.Def
14841480 image = comb_opns_ld_arr
14851481 )
14861482 blend_combination .create_layer (
1487- vis_method = "coloured slope " ,
1488- normalization = "value" , minimum = 0 , maximum = 1 ,
1483+ vis_method = "Slope gradient " ,
1484+ normalization = "value" , minimum = 0 , maximum = 55 ,
14891485 blend_mode = "normal" , opacity = 100 ,
14901486 colormap = "Reds_r" , min_colormap_cut = 0 , max_colormap_cut = 1 ,
14911487 image = slope_arr
0 commit comments