@@ -8,8 +8,11 @@ band = Band(1:1)
88
99weight_raster = GeoArray (A_array, (y, x, band), missingval = - 9999 )
1010weight_raster2d = GeoArray (A_array[:, :, 1 ], (y, x), missingval = - 9999 )
11- rasgraph2d = weightedrastergraph (weight_raster2d)
12- rasgraph = weightedrastergraph (weight_raster)
11+ rasgraph2d = weightedrastergraph (
12+ weight_raster2d,
13+ connect_using_avg_weights = false
14+ )
15+ rasgraph = weightedrastergraph (weight_raster, connect_using_avg_weights = false )
1316
1417# Test that graphs are the same regardless of whether weight_raster has Band dim
1518@test rasgraph2d. graph == rasgraph. graph
@@ -48,11 +51,11 @@ for i in 1:length(graph_edges)
4851 # Test that the weight is what it should be (assumes connect_using_avg_weights = true in graph construction)
4952 if (row_diff == 1 && col_diff == 1 ) # get diagonal average
5053 @test weight_i ==
51- SpatialGraphs. res_diagonal_avg (weight_raster[source_coords],
54+ SpatialGraphs. cond_diagonal_avg (weight_raster[source_coords],
5255 weight_raster[dest_coords])
5356 else
5457 @test weight_i ==
55- SpatialGraphs. res_cardinal_avg (weight_raster[source_coords],
58+ SpatialGraphs. cond_cardinal_avg (weight_raster[source_coords],
5659 weight_raster[dest_coords])
5760 end
5861end
0 commit comments