#include #include #include "cmd_line.h" #include "costHa.h" #include "local_proto.h" #define DATA(map, r, c) (map)[(r) * ncols + (c)] void ram2out (void) { extern CELL *cell, *x_cell, *y_cell; extern CELL *map_x_out, *map_y_out; extern float *map_out; extern int cum_fd, x_fd, y_fd; extern int nrows, ncols; extern struct Cell_head window; double north, west; double G_row_to_northing (), G_col_to_easting (); int row, col; north = G_row_to_northing (0.5, &window); west = G_col_to_easting (0.5, &window); /* Copy maps in ram to output maps, casting into integers */ if (verbose) fprintf (stderr, "\nWriting output: %s, x_output: %s, y_output: %s ... ", out_layer, x_out_layer, y_out_layer); for ( row=0 ; row