|
@@ -674,13 +674,15 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
cellval = Rast_get_d_value(ptr2, data_type2);
|
|
|
if (start_with_raster_vals == 1) {
|
|
|
+ insert(cellval, row, col);
|
|
|
costs.cost_out = cellval;
|
|
|
costs.nearest = cellval;
|
|
|
segment_put(&cost_seg, &costs, row, col);
|
|
|
}
|
|
|
else {
|
|
|
value = &zero;
|
|
|
- costs.cost_out = *value;
|
|
|
+ insert(zero, row, col);
|
|
|
+ costs.cost_out = *value;
|
|
|
costs.nearest = cellval;
|
|
|
segment_put(&cost_seg, &costs, row, col);
|
|
|
}
|
|
@@ -710,6 +712,7 @@ int main(int argc, char *argv[])
|
|
|
if (top_start_pt->row < 0 || top_start_pt->row >= nrows
|
|
|
|| top_start_pt->col < 0 || top_start_pt->col >= ncols)
|
|
|
G_fatal_error(_("Specified starting location outside database window"));
|
|
|
+ insert(zero, top_start_pt->row, top_start_pt->col);
|
|
|
segment_get(&cost_seg, &costs, top_start_pt->row,
|
|
|
top_start_pt->col);
|
|
|
|
|
@@ -979,6 +982,7 @@ int main(int argc, char *argv[])
|
|
|
costs.cost_out = min_cost;
|
|
|
costs.nearest = nearest;
|
|
|
segment_put(&cost_seg, &costs, row, col);
|
|
|
+ insert(min_cost, row, col);
|
|
|
if (dir == TRUE) {
|
|
|
segment_put(&dir_seg, &cur_dir, row, col);
|
|
|
}
|
|
@@ -988,6 +992,7 @@ int main(int argc, char *argv[])
|
|
|
costs.cost_out = min_cost;
|
|
|
costs.nearest = nearest;
|
|
|
segment_put(&cost_seg, &costs, row, col);
|
|
|
+ insert(min_cost, row, col);
|
|
|
if (dir == TRUE) {
|
|
|
segment_put(&dir_seg, &cur_dir, row, col);
|
|
|
}
|