diff --git a/doc/raster/r.example/main.c b/doc/raster/r.example/main.c index f9e29dbf529..3d5a955486b 100644 --- a/doc/raster/r.example/main.c +++ b/doc/raster/r.example/main.c @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) } /* write raster row to output raster map */ - if (Rast_put_raster_row(outfd, outrast, data_type) < 0) + if (Rast_put_row(outfd, outrast, data_type) < 0) G_fatal_error(_("Failed writing raster map <%s>"), result); } diff --git a/imagery/i.albedo/main.c b/imagery/i.albedo/main.c index 39eddc43738..91b59b94b0c 100644 --- a/imagery/i.albedo/main.c +++ b/imagery/i.albedo/main.c @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) } ((DCELL *) outrast)[col] = de; } - if (Rast_put_raster_row(outfd, outrast, out_data_type) < 0) + if (Rast_put_row(outfd, outrast, out_data_type) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); } diff --git a/imagery/i.atcorr/main.cpp b/imagery/i.atcorr/main.cpp index 227896187cf..b073b255143 100644 --- a/imagery/i.atcorr/main.cpp +++ b/imagery/i.atcorr/main.cpp @@ -124,7 +124,7 @@ static void write_fp_to_cell (int ofd, FCELL* buf) cbuf = (CELL*)Rast_allocate_buf(CELL_TYPE); for(col = 0; col < G_window_cols(); col++) cbuf[col] = round_c(buf[col]); - Rast_put_raster_row(ofd, cbuf, CELL_TYPE); + Rast_put_row(ofd, cbuf, CELL_TYPE); } @@ -405,7 +405,7 @@ static void process_raster (int ifd, InputMask imask, ScaleRange iscale, } /* write output */ - if(oflt) Rast_put_raster_row(ofd, buf, FCELL_TYPE); + if(oflt) Rast_put_row(ofd, buf, FCELL_TYPE); else write_fp_to_cell(ofd, buf); } diff --git a/imagery/i.biomass/main.c b/imagery/i.biomass/main.c index ee7a172464b..02c316e5cc0 100644 --- a/imagery/i.biomass/main.c +++ b/imagery/i.biomass/main.c @@ -179,7 +179,7 @@ int main(int argc, char *argv[]) outrast1[col] = d; } } - if (Rast_put_d_raster_row(outfd1, outrast1) < 0) + if (Rast_put_d_row(outfd1, outrast1) < 0) G_fatal_error(_("Failed writing raster map <%s>"), result1); } diff --git a/imagery/i.cca/transform.c b/imagery/i.cca/transform.c index f47e3c13c83..673780e0153 100644 --- a/imagery/i.cca/transform.c +++ b/imagery/i.cca/transform.c @@ -43,7 +43,7 @@ transform(int datafds[MX], int outfds[MX], int rows, int cols, /* output the row of data */ for (j = 1; j <= bands; j++) - if (Rast_put_raster_row(outfds[j], rowbufs[j], CELL_TYPE) < 0) + if (Rast_put_row(outfds[j], rowbufs[j], CELL_TYPE) < 0) G_fatal_error(_("Error writing cell map during transform.")); } for (i = 1; i <= bands; i++) diff --git a/imagery/i.class/signature.c b/imagery/i.class/signature.c index f05d27bd4a8..0d9b64454c4 100644 --- a/imagery/i.class/signature.c +++ b/imagery/i.class/signature.c @@ -291,7 +291,7 @@ int display_signature(void) buffer[col] = (CELL) 1; past:; } - Rast_put_raster_row(fd, buffer, CELL_TYPE); + Rast_put_row(fd, buffer, CELL_TYPE); } Rast_close(fd); diff --git a/imagery/i.eb.eta/main.c b/imagery/i.eb.eta/main.c index 82c5ba4b07e..098be99707f 100644 --- a/imagery/i.eb.eta/main.c +++ b/imagery/i.eb.eta/main.c @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) outrast1[col] = d; } } - if (Rast_put_d_raster_row(outfd1,outrast1) < 0) + if (Rast_put_d_row(outfd1,outrast1) < 0) G_fatal_error(_("Failed writing raster map <%s>"), result1); } G_free(inrast_rnetday); diff --git a/imagery/i.eb.evapfr/main.c b/imagery/i.eb.evapfr/main.c index 153daafbd3a..7d80c281fde 100644 --- a/imagery/i.eb.evapfr/main.c +++ b/imagery/i.eb.evapfr/main.c @@ -166,11 +166,11 @@ int main(int argc, char *argv[]) } } } - if (Rast_put_d_raster_row(outfd1, outrast1) < 0) + if (Rast_put_d_row(outfd1, outrast1) < 0) G_fatal_error(_("Failed writing raster map <%s>"), result1); if (makin) { - if (Rast_put_d_raster_row(outfd2, outrast2) < 0) + if (Rast_put_d_row(outfd2, outrast2) < 0) G_fatal_error(_("Failed writing raster map <%s>"), result2); } } diff --git a/imagery/i.eb.h_SEBAL01/main.c b/imagery/i.eb.h_SEBAL01/main.c index b7642616393..a3cda667a01 100644 --- a/imagery/i.eb.h_SEBAL01/main.c +++ b/imagery/i.eb.h_SEBAL01/main.c @@ -629,7 +629,7 @@ int main(int argc, char *argv[]) outrast[col] = d_h3; } } - if (Rast_put_d_raster_row(outfd, outrast) < 0) + if (Rast_put_d_row(outfd, outrast) < 0) G_fatal_error("Failed writing raster map <%s>", h0); } diff --git a/imagery/i.eb.soilheatflux/main.c b/imagery/i.eb.soilheatflux/main.c index ebe93ec393e..5613f46590e 100644 --- a/imagery/i.eb.soilheatflux/main.c +++ b/imagery/i.eb.soilheatflux/main.c @@ -169,7 +169,7 @@ int main(int argc, char *argv[]) outrast[col] = d; } } - if (Rast_put_d_raster_row(outfd, outrast) < 0) + if (Rast_put_d_row(outfd, outrast) < 0) G_fatal_error(_("Failed writing raster map <%s>"), result); } G_free(inrast_albedo); diff --git a/imagery/i.emissivity/main.c b/imagery/i.emissivity/main.c index 1ce04cf789c..3793e510622 100644 --- a/imagery/i.emissivity/main.c +++ b/imagery/i.emissivity/main.c @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) outr[col] = d; } } - if (Rast_put_raster_row(outfd, outr, DCELL_TYPE) < 0) + if (Rast_put_row(outfd, outr, DCELL_TYPE) < 0) G_fatal_error(_("Cannot write to output raster file")); } G_free(inr); diff --git a/imagery/i.evapo.time_integration/main.c b/imagery/i.evapo.time_integration/main.c index 36f0439ee35..87ea76d6358 100644 --- a/imagery/i.evapo.time_integration/main.c +++ b/imagery/i.evapo.time_integration/main.c @@ -413,7 +413,7 @@ int main(int argc, char *argv[]) } } } - if (Rast_put_raster_row(outfd, outrast, out_data_type) < 0) + if (Rast_put_row(outfd, outrast, out_data_type) < 0) G_fatal_error(_("Unable to write to raster map<%s>"), result); } diff --git a/imagery/i.fft/main.c b/imagery/i.fft/main.c index 3040b047531..a903388daf1 100644 --- a/imagery/i.fft/main.c +++ b/imagery/i.fft/main.c @@ -184,8 +184,8 @@ int main(int argc, char *argv[]) cell_real[j] = data[C(i, j)][0]; cell_imag[j] = data[C(i, j)][1]; } - Rast_put_d_raster_row(realfd, cell_real); - Rast_put_d_raster_row(imagfd, cell_imag); + Rast_put_d_row(realfd, cell_real); + Rast_put_d_row(imagfd, cell_imag); G_percent(i+1, rows, 2); } diff --git a/imagery/i.his.rgb/main.c b/imagery/i.his.rgb/main.c index dd8fec19c06..266a97a8fd8 100644 --- a/imagery/i.his.rgb/main.c +++ b/imagery/i.his.rgb/main.c @@ -102,7 +102,7 @@ int main(int argc, char **argv) /* write out the new row for each cell map */ for (band = 0; band < 3; band++) - if (Rast_put_raster_row(fd_output[band], rowbuffer[band], CELL_TYPE) + if (Rast_put_row(fd_output[band], rowbuffer[band], CELL_TYPE) < 0) G_fatal_error(_("Failed writing raster map row %d"), i); } diff --git a/imagery/i.ifft/main.c b/imagery/i.ifft/main.c index b61b23470d7..14e0f4c038a 100644 --- a/imagery/i.ifft/main.c +++ b/imagery/i.ifft/main.c @@ -223,7 +223,7 @@ int main(int argc, char *argv[]) for (i = 0; i < rows; i++) { for (j = 0; j < cols; j++) cell_real[j] = data[C(i, j)][0]; - Rast_put_d_raster_row(outputfd, cell_real); + Rast_put_d_row(outputfd, cell_real); G_percent(i+1, rows, 2); } diff --git a/imagery/i.latlong/main.c b/imagery/i.latlong/main.c index 71a590c6e76..14dcb0ed75b 100644 --- a/imagery/i.latlong/main.c +++ b/imagery/i.latlong/main.c @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) d = latitude; outrast1[col] = d; } - if (Rast_put_d_raster_row(outfd1, outrast1) < 0) + if (Rast_put_d_row(outfd1, outrast1) < 0) G_fatal_error(_("Cannot write to output raster file")); } G_free(inrast); diff --git a/imagery/i.maxlik/main.c b/imagery/i.maxlik/main.c index ed863891c42..67e951a3038 100644 --- a/imagery/i.maxlik/main.c +++ b/imagery/i.maxlik/main.c @@ -114,9 +114,9 @@ int main(int argc, char *argv[]) row); classify(class_cell, reject_cell, ncols); - Rast_put_raster_row(class_fd, class_cell, CELL_TYPE); + Rast_put_row(class_fd, class_cell, CELL_TYPE); if (reject_fd > 0) - Rast_put_raster_row(reject_fd, reject_cell, CELL_TYPE); + Rast_put_row(reject_fd, reject_cell, CELL_TYPE); } G_percent(nrows, nrows, 2); diff --git a/imagery/i.modis.qc/main.c b/imagery/i.modis.qc/main.c index d233d253954..d0dcb9cb14e 100644 --- a/imagery/i.modis.qc/main.c +++ b/imagery/i.modis.qc/main.c @@ -323,7 +323,7 @@ int main(int argc, char *argv[]) outrast[col] = c; } - if (Rast_put_c_raster_row(outfd, outrast) < 0) + if (Rast_put_c_row(outfd, outrast) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), output->answer, row); } diff --git a/imagery/i.pca/main.c b/imagery/i.pca/main.c index fb6711c3243..cfccb64e715 100644 --- a/imagery/i.pca/main.c +++ b/imagery/i.pca/main.c @@ -512,9 +512,9 @@ write_pca(double **eigmat, int *inp_fd, char *out_basename, if (pass == PASSES) { if (scale) - Rast_put_raster_row(out_fd, outbuf, CELL_TYPE); + Rast_put_row(out_fd, outbuf, CELL_TYPE); else - Rast_put_raster_row(out_fd, outbuf, DCELL_TYPE); + Rast_put_row(out_fd, outbuf, DCELL_TYPE); } } diff --git a/imagery/i.rectify/write.c b/imagery/i.rectify/write.c index 7d64fecb7d4..b815123ba14 100644 --- a/imagery/i.rectify/write.c +++ b/imagery/i.rectify/write.c @@ -29,7 +29,7 @@ int write_matrix(int row, int col) unlink(temp_name); G_fatal_error(_("Error while writing to temp file")); } - /*Rast_put_map_row_random (outfd, cell_buf[n], row++, col, matrix_cols); */ + /*Rast_put_c_row_random (outfd, cell_buf[n], row++, col, matrix_cols); */ } select_current_env(); @@ -55,7 +55,7 @@ int write_map(char *name) if (read(temp_fd, rast, target_window.cols * Rast_cell_size(map_type)) != target_window.cols * Rast_cell_size(map_type)) G_fatal_error(_("Error writing row %d"), row); - if (Rast_put_raster_row(fd, rast, map_type) < 0) { + if (Rast_put_row(fd, rast, map_type) < 0) { G_fatal_error(_("Failed writing raster map <%s> row %d"), name, row); unlink(temp_name); diff --git a/imagery/i.rgb.his/main.c b/imagery/i.rgb.his/main.c index 37dbd352d0c..ce4180fce2c 100644 --- a/imagery/i.rgb.his/main.c +++ b/imagery/i.rgb.his/main.c @@ -100,7 +100,7 @@ int main(int argc, char **argv) /* write out the new row for each cell map */ for (band = 0; band < 3; band++) - if (Rast_put_raster_row(fd_output[band], rowbuffer[band], CELL_TYPE) + if (Rast_put_row(fd_output[band], rowbuffer[band], CELL_TYPE) < 0) G_fatal_error(_("Failed writing raster map row %d"), i); } diff --git a/imagery/i.smap/write_img.c b/imagery/i.smap/write_img.c index d00f7fe99f3..024cb3db1bf 100644 --- a/imagery/i.smap/write_img.c +++ b/imagery/i.smap/write_img.c @@ -20,7 +20,7 @@ int write_img(unsigned char **img, int ncols, int nrows, struct SigSet *S, /* cl G_debug(3, "class: [%d] row/col: [%d][%d]", class, row, col); files->outbuf[col] = (CELL) S->ClassSig[class].classnum; } - Rast_put_raster_row(files->output_fd, files->outbuf, CELL_TYPE); + Rast_put_row(files->output_fd, files->outbuf, CELL_TYPE); } G_percent(nrows, nrows, 2); diff --git a/imagery/i.sunhours/main.c b/imagery/i.sunhours/main.c index 0f4a3c9d954..299f98e345e 100644 --- a/imagery/i.sunhours/main.c +++ b/imagery/i.sunhours/main.c @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) d_N = (360.0 / (15.0 * PI)) * d_Ws; ((DCELL *) outrast1)[col] = d_N; } - if (Rast_put_raster_row(outfd1, outrast1, DCELL_TYPE) < 0) + if (Rast_put_row(outfd1, outrast1, DCELL_TYPE) < 0) G_fatal_error(_("Cannot write to output raster file")); } G_free(inrast_lat); diff --git a/imagery/i.vi/main.c b/imagery/i.vi/main.c index d6f98161c88..94604e74f0c 100644 --- a/imagery/i.vi/main.c +++ b/imagery/i.vi/main.c @@ -370,7 +370,7 @@ int main(int argc, char *argv[]) outrast[col] = va_ri(d_redchan, d_greenchan, d_bluechan); } } - if (Rast_put_d_raster_row(outfd, outrast) < 0) + if (Rast_put_d_row(outfd, outrast) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); } diff --git a/imagery/i.zc/main.c b/imagery/i.zc/main.c index b43bfc8124d..f213c816746 100644 --- a/imagery/i.zc/main.c +++ b/imagery/i.zc/main.c @@ -182,7 +182,7 @@ int main(int argc, char *argv[]) for (j = 0; j < oc; j++) { *(cell_row + j) = (CELL) (*(data[1] + i * cols + j)); } - Rast_put_raster_row(zcfd, cell_row, CELL_TYPE); + Rast_put_row(zcfd, cell_row, CELL_TYPE); } Rast_close(zcfd); diff --git a/include/raster.h b/include/raster.h index c2713e541c3..1237c41b3b8 100644 --- a/include/raster.h +++ b/include/raster.h @@ -401,11 +401,10 @@ int Rast_set_quant_rules(int, struct Quant *); int Rast_put_cellhd(const char *, struct Cell_head *); /* put_row.c */ -int Rast_put_map_row(int, const CELL *); -int Rast_put_raster_row(int, const void *, RASTER_MAP_TYPE); -int Rast_put_c_raster_row(int, const CELL *); -int Rast_put_f_raster_row(int, const FCELL *); -int Rast_put_d_raster_row(int, const DCELL *); +int Rast_put_row(int, const void *, RASTER_MAP_TYPE); +int Rast_put_c_row(int, const CELL *); +int Rast_put_f_row(int, const FCELL *); +int Rast_put_d_row(int, const DCELL *); int Rast__open_null_write(int); int Rast__write_null_bits(int, const unsigned char *, int, int, int); diff --git a/lib/gpde/N_arrays_io.c b/lib/gpde/N_arrays_io.c index e8b2874b078..a3c6734d9c7 100644 --- a/lib/gpde/N_arrays_io.c +++ b/lib/gpde/N_arrays_io.c @@ -224,17 +224,17 @@ void N_write_array_2d_to_rast(N_array_2d * array, char *name) drast[x] = N_get_array_2d_d_value(array, x, y); } if (type == CELL_TYPE) - if (!Rast_put_c_raster_row(map, rast)) { + if (!Rast_put_c_row(map, rast)) { Rast_unopen(map); /*unopen the new raster map */ G_fatal_error(_("Unable to write raster row %i"), y); } if (type == FCELL_TYPE) - if (!Rast_put_f_raster_row(map, frast)) { + if (!Rast_put_f_row(map, frast)) { Rast_unopen(map); /*unopen the new raster map */ G_fatal_error(_("Unable to write raster row %i"), y); } if (type == DCELL_TYPE) - if (!Rast_put_d_raster_row(map, drast)) { + if (!Rast_put_d_row(map, drast)) { Rast_unopen(map); /*unopen the new raster map */ G_fatal_error(_("Unable to write raster row %i"), y); } diff --git a/lib/raster/closecell.c b/lib/raster/closecell.c index 4ccba71862f..c8bcb4effc4 100644 --- a/lib/raster/closecell.c +++ b/lib/raster/closecell.c @@ -243,7 +243,7 @@ static int close_new_gdal(int fd, int ok) Rast_zero_raster_buf(fcb->data, fcb->map_type); for (row = fcb->cur_row; row < fcb->cellhd.rows; row++) - Rast_put_raster_row(fd, fcb->data, fcb->map_type); + Rast_put_row(fd, fcb->data, fcb->map_type); G_free(fcb->data); fcb->data = NULL; } @@ -334,7 +334,7 @@ static int close_new(int fd, int ok) if (fcb->cur_row < fcb->cellhd.rows) { Rast_zero_raster_buf(fcb->data, fcb->map_type); for (row = fcb->cur_row; row < fcb->cellhd.rows; row++) - Rast_put_raster_row(fd, fcb->data, fcb->map_type); + Rast_put_row(fd, fcb->data, fcb->map_type); G_free(fcb->data); fcb->data = NULL; } diff --git a/lib/raster/opencell.c b/lib/raster/opencell.c index ed305cd8a31..d571230a0c3 100644 --- a/lib/raster/opencell.c +++ b/lib/raster/opencell.c @@ -354,7 +354,7 @@ int Rast__open_old(const char *name, const char *mapset) \brief Opens a new cell file in a database (compressed) Opens a new cell file name in the current mapset for writing - by Rast_put_raster_row(). + by Rast_put_row(). The file is created and filled with no data it is assumed that the new cell file is to conform to the current window. diff --git a/lib/raster/put_row.c b/lib/raster/put_row.c index 488f73fd9da..ee482385119 100644 --- a/lib/raster/put_row.c +++ b/lib/raster/put_row.c @@ -1,76 +1,18 @@ +/*! + \file raster/put_row.c + + \brief Raster library - Put raster row + + (C) 2003-2009 by the GRASS Development Team + + This program is free software under the GNU General Public License + (>=v2). Read the file COPYING that comes with GRASS for details. + + \author Original author CERL + */ /********************************************************************** - * - * G_put_[c/f/d]_raster_row(fd, buf) - * int fd file descriptor of the opened map - * [F/D]CELL *buf buffer holding row info to be written - * - * Writes the next row for the cell file opened on 'fd' from 'buf' - * All writes go into NEW files that exactly match the current window. - * The file must have been opened with Rast_open_new() - * and be written sequentially, ie no skipping rows - * - * when the null values are embeded into the data, corresponding cells are - * changed to 0's and the corresponding null value row is written into null - * file. - * - * *** NOTE *** - * A map cannot be copied using Rast_get_row() and Rast_put_raster_row(). - * The former resamples the data of the original map into a row buffer - * that matches the current window. The later writes out rows associated - * with the window. - * - * returns: 1 if successful - * -1 on fail - * - * Keeps track of the minimum and maximum cell value for use in updating - * the range file upon close of the cell file. - * HOWEVER when nulls are not embeded, the cells are considered 0's as far - * as updating range is concerned, even if the corresponding cell is null - * in the resulting null file, so programmer should be carefult to set all - * the null values using Rast_set_null_value() or G_insert_[d/f_]null_values() - * - ********************************************************************** - * - * Rast_put_map_row(fd, buf) - * int fd file descriptor of the opened map - * CELL *buf buffer holding row info to be written - * - * Writes the next row for the cell file opened on 'fd' from 'buf' - * All writes go into NEW files that exactly match the current window. - * The file must have been opened with Rast_open_new() - * and be written sequentially, ie no skipping rows - * - * NULLS are written into null bitmap file for all cells which are zero, - * and cells which have null value (these cells are converted to 0's before - * writing) - * - * *** NOTE *** - * A map cannot be copied using Rast_get_c_row() and Rast_put_map_row(). - * The former resamples the data of the original map into a row buffer - * that matches the current window. The later writes out rows associated - * with the window. - * - * returns: 1 if successful - * -1 on fail - * - * Keeps track of the minimum and maximum cell value for use in updating - * the range file upon close of the cell file. - * - *********************************************************************** - * - * put_null_value_row(fd, buf) - * int fd File descriptor where data is to be written - * char *buf Buffer holding null data - * - * converts a buffer of zero's and ones to bitstream and stores this - * bitstream in memory. (the null rows from memory are written into null - * file after the limit is reached, and the place for new null rows - * to be kept in memory is freed. Should not be used by application - * programs. - * - * returns: 0 if successful - * -1 on fail + **********************************************************************/ #include @@ -99,14 +41,8 @@ static int convert_and_write_if(int, const CELL *); static int convert_and_write_id(int, const CELL *); static int convert_and_write_df(int, const DCELL *); static int convert_and_write_fd(int, const FCELL *); -static int put_raster_row(int fd, const void *buf, RASTER_MAP_TYPE data_type, - int zeros_r_nulls); - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ +static int put_raster_row(int, const void *, RASTER_MAP_TYPE, + int); static int put_null_value_row(int fd, const char *buf) { @@ -127,48 +63,98 @@ static int put_null_value_row(int fd, const char *buf) return 1; } -int Rast_put_map_row(int fd, const CELL * buf) -{ - struct fileinfo *fcb = &R__.fileinfo[fd]; +/*! + \brief Writes the next row for cell/fcell/dcell file - if (fcb->map_type != CELL_TYPE) { - G_fatal_error(_("Rast_put_map_row: %s is not integer! Use G_put_[f/d]_raster_row()!"), - fcb->name); - return -1; - } + Writes the next row for the cell file opened on 'fd' from 'buf' All + writes go into NEW files that exactly match the current window. The + file must have been opened with Rast_open_new() and be written + sequentially, ie no skipping rows. + + When the null values are embeded into the data, corresponding cells + are changed to 0's and the corresponding null value row is written + into null file. + + A map cannot be copied using Rast_get_row() and + Rast_put_row(). The former resamples the data of the original + map into a row buffer that matches the current window. The later + writes out rows associated with the window. + + Keeps track of the minimum and maximum cell value for use in + updating the range file upon close of the cell file. HOWEVER when + nulls are not embeded, the cells are considered 0's as far as + updating range is concerned, even if the corresponding cell is null + in the resulting null file, so programmer should be carefult to set + all the null values using Rast_set_null_value() or + G_insert_d_null_values() or G_insert_f_null_values(). - return put_raster_row(fd, buf, CELL_TYPE, 1); -} + \param fd file descriptor where data is to be written + \param buf buffer holding data + \param data_type raster map type (CELL_TYPE, FCELL_TYPE, DCELL_TYPE) -int Rast_put_raster_row(int fd, const void *buf, RASTER_MAP_TYPE data_type) + \return 1 on success + \return -1 on failure +*/ +int Rast_put_row(int fd, const void *buf, RASTER_MAP_TYPE data_type) { - return put_raster_row(fd, buf, data_type, 0); + return put_raster_row(fd, buf, data_type, data_type); } -int Rast_put_c_raster_row(int fd, const CELL * buf) +/*! + \brief Writes the next row for cell file (CELL version) + + See Rast_put_row() for details. + + \param fd file descriptor where data is to be written + \param buf buffer holding data + + \return 1 on success + \return -1 on failure +*/ +int Rast_put_c_row(int fd, const CELL * buf) { - return Rast_put_raster_row(fd, buf, CELL_TYPE); + return Rast_put_row(fd, buf, CELL_TYPE); } -int Rast_put_f_raster_row(int fd, const FCELL * buf) +/*! + \brief Writes the next row for fcell file (FCELL version) + + See Rast_put_row() for details. + + \param fd file descriptor where data is to be written + \param buf buffer holding data + + \return 1 on success + \return -1 on failure +*/ +int Rast_put_f_row(int fd, const FCELL * buf) { - return Rast_put_raster_row(fd, buf, FCELL_TYPE); + return Rast_put_row(fd, buf, FCELL_TYPE); } -int Rast_put_d_raster_row(int fd, const DCELL * buf) +/*! + \brief Writes the next row for dcell file (DCELL version) + + See Rast_put_row() for details. + + \param fd file descriptor where data is to be written + \param buf buffer holding data + + \return 1 on success + \return -1 on failure +*/ +int Rast_put_d_row(int fd, const DCELL * buf) { - return Rast_put_raster_row(fd, buf, DCELL_TYPE); + return Rast_put_row(fd, buf, DCELL_TYPE); } -/*--------------------------------------------------------------------------*/ - static int check_open(const char *me, int fd) { struct fileinfo *fcb = &R__.fileinfo[fd]; switch (fcb->open_mode) { case OPEN_OLD: - G_warning(_("%s: map [%s] not open for write - request ignored"), me, + G_warning(_("%s: raster map <%s> not open for write - request ignored"), me, fcb->name); break; case OPEN_NEW_COMPRESSED: @@ -190,13 +176,11 @@ static void write_error(int fd, int row) if (fcb->io_error) return; - G_warning(_("map [%s] - unable to write row %d"), fcb->name, row); + G_warning(_("Raster map <%s> - unable to write row %d"), fcb->name, row); fcb->io_error = 1; } -/*--------------------------------------------------------------------------*/ - static int write_data(int fd, int row, unsigned char *buf, int n) { struct fileinfo *fcb = &R__.fileinfo[fd]; @@ -223,8 +207,6 @@ static int write_data_compressed(int fd, int row, unsigned char *buf, int n) return 0; } -/*--------------------------------------------------------------------------*/ - static void set_file_pointer(int fd, int row) { struct fileinfo *fcb = &R__.fileinfo[fd]; @@ -232,12 +214,6 @@ static void set_file_pointer(int fd, int row) fcb->row_ptr[row] = lseek(fd, 0L, SEEK_CUR); } -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - static int convert_float(XDR * xdrs, char *null_buf, const FCELL * rast, int row, int n) { @@ -288,10 +264,7 @@ static int convert_double(XDR * xdrs, char *null_buf, const DCELL * rast, return 0; } -/*--------------------------------------------------------------------------*/ - /* writes data to fcell file for either full or partial rows */ - static int put_fp_data(int fd, char *null_buf, const void *rast, int row, int n, RASTER_MAP_TYPE data_type) { @@ -346,12 +319,6 @@ static int put_fp_data(int fd, char *null_buf, const void *rast, return 1; } -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - static void convert_int(unsigned char *wk, char *null_buf, const CELL * rast, int n, int len, int zeros_r_nulls) { @@ -474,8 +441,6 @@ static int zlib_compress(unsigned char *dst, unsigned char *src, int n, return (nwrite >= total) ? 0 : nwrite; } -/*--------------------------------------------------------------------------*/ - static int put_data(int fd, char *null_buf, const CELL *cell, int row, int n, int zeros_r_nulls) { @@ -564,8 +529,6 @@ static int put_data(int fd, char *null_buf, const CELL *cell, return 1; } -/*--------------------------------------------------------------------------*/ - static int put_data_gdal(int fd, const void *rast, int row, int n, int zeros_r_nulls, RASTER_MAP_TYPE map_type) { @@ -616,12 +579,6 @@ static int put_data_gdal(int fd, const void *rast, int row, int n, #endif } -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - static int put_raster_data(int fd, char *null_buf, const void *rast, int row, int n, int zeros_r_nulls, RASTER_MAP_TYPE map_type) @@ -636,12 +593,6 @@ static int put_raster_data(int fd, char *null_buf, const void *rast, : put_fp_data(fd, null_buf, rast, row, n, map_type); } -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - static int put_null_data(int fd, const char *flags, int row) { struct fileinfo *fcb = &R__.fileinfo[fd]; @@ -684,13 +635,21 @@ static int put_null_data(int fd, const char *flags, int row) return 1; } +/*! + \brief Open null file for write + + \param fd file descriptor of raster cell data file + + \return field descriptor of null data file + \return -1 on failure +*/ int Rast__open_null_write(int fd) { struct fileinfo *fcb = &R__.fileinfo[fd]; int null_fd; if (access(fcb->null_temp_name, 0) != 0) { - G_warning(_("unable to find a temporary null file %s"), + G_warning(_("Unable to find a temporary null file <%s>"), fcb->null_temp_name); return -1; } @@ -702,8 +661,20 @@ int Rast__open_null_write(int fd) return null_fd; } +/*! + \brief Write null data + + \param null_fd file descriptor of null file where data is to be written + \param flags ? + \param row row number + \param col col number + \param fd file descriptor of cell data file + + \return 1 on success + \return -1 on failure +*/ int Rast__write_null_bits(int null_fd, const unsigned char *flags, int row, - int cols, int fd) + int cols, int fd) { off_t offset; size_t size; @@ -712,24 +683,18 @@ int Rast__write_null_bits(int null_fd, const unsigned char *flags, int row, offset = (off_t) size *row; if (lseek(null_fd, offset, SEEK_SET) < 0) { - G_warning(_("error writing null row %d"), row); + G_warning(_("Error writing null row %d"), row); return -1; } if (write(null_fd, flags, size) != size) { - G_warning(_("error writing null row %d"), row); + G_warning(_("Error writing null row %d"), row); return -1; } return 1; } -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------*/ - static int convert_and_write_if(int fd, const CELL * buf) { struct fileinfo *fcb = &R__.fileinfo[fd]; @@ -742,7 +707,7 @@ static int convert_and_write_if(int fd, const CELL * buf) else p[i] = (FCELL) buf[i]; - return Rast_put_f_raster_row(fd, p); + return Rast_put_f_row(fd, p); } static int convert_and_write_df(int fd, const DCELL * buf) @@ -757,7 +722,7 @@ static int convert_and_write_df(int fd, const DCELL * buf) else p[i] = (FCELL) buf[i]; - return Rast_put_f_raster_row(fd, p); + return Rast_put_f_row(fd, p); } static int convert_and_write_id(int fd, const CELL * buf) @@ -772,7 +737,7 @@ static int convert_and_write_id(int fd, const CELL * buf) else p[i] = (DCELL) buf[i]; - return Rast_put_d_raster_row(fd, p); + return Rast_put_d_row(fd, p); } static int convert_and_write_fd(int fd, const FCELL * buf) @@ -787,7 +752,7 @@ static int convert_and_write_fd(int fd, const FCELL * buf) else p[i] = (DCELL) buf[i]; - return Rast_put_d_raster_row(fd, p); + return Rast_put_d_row(fd, p); } static int convert_and_write_fi(int fd, const FCELL * buf) @@ -802,7 +767,7 @@ static int convert_and_write_fi(int fd, const FCELL * buf) else p[i] = (CELL) buf[i]; - return Rast_put_c_raster_row(fd, p); + return Rast_put_c_row(fd, p); } static int convert_and_write_di(int fd, const DCELL * buf) @@ -817,11 +782,23 @@ static int convert_and_write_di(int fd, const DCELL * buf) else p[i] = (CELL) buf[i]; - return Rast_put_c_raster_row(fd, p); + return Rast_put_c_row(fd, p); } -/*--------------------------------------------------------------------------*/ +/*! + \brief converts a buffer of zero's and ones to bitstream. + + Stores this bitstream in memory. (the null rows from memory are + written into null file after the limit is reached, and the place for + new null rows to be kept in memory is freed. Should not be used by + application programs. + \param fd file descriptor where data is to be written + \param buf buffer holding null data + + \return 0 if successful + \return -1 on fail +*/ static int put_raster_row(int fd, const void *buf, RASTER_MAP_TYPE data_type, int zeros_r_nulls) { diff --git a/lib/rst/interp_float/output2d.c b/lib/rst/interp_float/output2d.c index d3e804fc29c..7422c710514 100644 --- a/lib/rst/interp_float/output2d.c +++ b/lib/rst/interp_float/output2d.c @@ -159,7 +159,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, /* curr * for(j=0;jnsizc;j++) fprintf(stderr,"%f ",cell1[j]); * fprintf(stderr,"\n"); */ - Rast_put_f_raster_row(cf1, cell1); + Rast_put_f_row(cf1, cell1); } } @@ -176,7 +176,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, /* curr return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_dx); - Rast_put_f_raster_row(cf2, cell1); + Rast_put_f_row(cf2, cell1); } } @@ -192,7 +192,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, /* curr return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_dy); - Rast_put_f_raster_row(cf3, cell1); + Rast_put_f_row(cf3, cell1); } } @@ -208,7 +208,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, /* curr return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_xx); - Rast_put_f_raster_row(cf4, cell1); + Rast_put_f_row(cf4, cell1); } } @@ -224,7 +224,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, /* curr return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_yy); - Rast_put_f_raster_row(cf5, cell1); + Rast_put_f_row(cf5, cell1); } } @@ -240,7 +240,7 @@ int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, /* curr return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_xy); - Rast_put_f_raster_row(cf6, cell1); + Rast_put_f_row(cf6, cell1); } } diff --git a/lib/rst/interp_float/resout2d.c b/lib/rst/interp_float/resout2d.c index e25fa7cf053..2ec718a4b9f 100644 --- a/lib/rst/interp_float/resout2d.c +++ b/lib/rst/interp_float/resout2d.c @@ -145,7 +145,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_z); - if (Rast_put_f_raster_row(cf1, cell1) < 0) { + if (Rast_put_f_row(cf1, cell1) < 0) { G_warning(_("Failed writing raster map")); return -1; } @@ -168,7 +168,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax * fprintf(stderr,"%f ",cell1[ii]); } * fprintf(stderr,"params->nsizc=%d \n",params->nsizc); */ - if (Rast_put_f_raster_row(cf2, cell1) < 0) { + if (Rast_put_f_row(cf2, cell1) < 0) { G_warning(_("Failed writing raster map")); return -1; } @@ -186,7 +186,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_dy); - if (Rast_put_f_raster_row(cf3, cell1) < 0) { + if (Rast_put_f_row(cf3, cell1) < 0) { G_warning(_("Failed writing raster map")); return -1; } @@ -204,7 +204,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_xx); - if (Rast_put_f_raster_row(cf4, cell1) < 0) { + if (Rast_put_f_row(cf4, cell1) < 0) { G_warning(_("Failed writing raster map")); return -1; } @@ -222,7 +222,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_yy); - if (Rast_put_f_raster_row(cf5, cell1) < 0) { + if (Rast_put_f_row(cf5, cell1) < 0) { G_warning(_("Failed writing raster map")); return -1; } @@ -240,7 +240,7 @@ int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax return -1; } fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_xy); - if (Rast_put_f_raster_row(cf6, cell1) < 0) { + if (Rast_put_f_row(cf6, cell1) < 0) { G_warning(_("Failed writing raster map")); return -1; } diff --git a/raster/r.basins.fill/main.c b/raster/r.basins.fill/main.c index f1252284bf1..26183163886 100644 --- a/raster/r.basins.fill/main.c +++ b/raster/r.basins.fill/main.c @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) /* write out partitioned watershed map */ for (row = 0; row < nrows; row++) - Rast_put_raster_row(partfd, drain + (row * ncols), CELL_TYPE); + Rast_put_row(partfd, drain + (row * ncols), CELL_TYPE); G_message(_("Creating support files for <%s>..."), part_name); Rast_close(partfd); diff --git a/raster/r.bitpattern/main.c b/raster/r.bitpattern/main.c index acbcdd4762e..6089a404ace 100644 --- a/raster/r.bitpattern/main.c +++ b/raster/r.bitpattern/main.c @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) } - if (Rast_put_raster_row(outfd, outrast, data_type) < 0) + if (Rast_put_row(outfd, outrast, data_type) < 0) G_fatal_error(_("Unable to write to <%s>"), result); } diff --git a/raster/r.buffer/write_map.c b/raster/r.buffer/write_map.c index a0077f0cb28..112ca7db7da 100644 --- a/raster/r.buffer/write_map.c +++ b/raster/r.buffer/write_map.c @@ -75,7 +75,7 @@ int write_output_map(char *output, int offset) if (cell[k] == 0) Rast_set_null_value(&cell[k], 1, CELL_TYPE); - if (Rast_put_raster_row(fd_out, cell, CELL_TYPE) < 0) + if (Rast_put_row(fd_out, cell, CELL_TYPE) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), output, row); } diff --git a/raster/r.carve/raster.c b/raster/r.carve/raster.c index 301119ce055..1173a06474e 100644 --- a/raster/r.carve/raster.c +++ b/raster/r.carve/raster.c @@ -35,7 +35,7 @@ void *write_raster(void *buf, const int fd, const RASTER_MAP_TYPE rtype) for (i = 0; i < rows; i++) { G_percent(i, rows, 10); - Rast_put_raster_row(fd, tmpbuf, rtype); + Rast_put_row(fd, tmpbuf, rtype); tmpbuf = G_incr_void_ptr(tmpbuf, Rast_cell_size(rtype) * G_window_cols()); } diff --git a/raster/r.circle/main.c b/raster/r.circle/main.c index 9e5c61fad8f..407c100592c 100644 --- a/raster/r.circle/main.c +++ b/raster/r.circle/main.c @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) if (int_buf[c] == 0) Rast_set_null_value(&int_buf[c], 1, CELL_TYPE); } - Rast_put_raster_row(cellfile, int_buf, CELL_TYPE); + Rast_put_row(cellfile, int_buf, CELL_TYPE); } } diff --git a/raster/r.clump/clump.c b/raster/r.clump/clump.c index eb4361afd3d..393cb8aa83f 100644 --- a/raster/r.clump/clump.c +++ b/raster/r.clump/clump.c @@ -221,7 +221,7 @@ CELL clump(int in_fd, int out_fd) for (col = 1; col <= ncols; col++) out_cell[col] = index[cur_clump[col]]; - if (Rast_put_raster_row (out_fd, out_cell+1, CELL_TYPE) < 0) + if (Rast_put_row (out_fd, out_cell+1, CELL_TYPE) < 0) G_fatal_error (_("Unable to properly write output raster map")); */ col = ncols; @@ -235,7 +235,7 @@ CELL clump(int in_fd, int out_fd) if (out_cell[column] == 0) Rast_set_null_value(&out_cell[column], 1, CELL_TYPE); } - if (Rast_put_raster_row(out_fd, out_cell, CELL_TYPE) < 0) + if (Rast_put_row(out_fd, out_cell, CELL_TYPE) < 0) G_fatal_error(_("Failed writing raster map row %d"), row); } diff --git a/raster/r.composite/main.c b/raster/r.composite/main.c index d2993a0d33d..1509d2cff9c 100644 --- a/raster/r.composite/main.c +++ b/raster/r.composite/main.c @@ -247,7 +247,7 @@ int main(int argc, char **argv) (val[2] * B[1].levels + val[1]) * B[0].levels + val[0]; } - if (Rast_put_raster_row(out_file, out_array, CELL_TYPE) < 0) + if (Rast_put_row(out_file, out_array, CELL_TYPE) < 0) G_fatal_error(_("Failed writing raster map <%s>"), out_name); } G_percent(window.rows, window.rows, 1); diff --git a/raster/r.compress/main.c b/raster/r.compress/main.c index 94ee535a40b..dbd85fb4236 100644 --- a/raster/r.compress/main.c +++ b/raster/r.compress/main.c @@ -27,7 +27,7 @@ * Next byte(s): category number. The number of bytes is determined * by the number of bytes in a cell * - * The normal G_open_cell(), and Rast_put_raster_row() do the compression + * The normal G_open_cell(), and Rast_put_row() do the compression * This program must only check that the file is not a reclass file and * is not already compressed. * @@ -220,7 +220,7 @@ static int doit(char *name, int uncompress, RASTER_MAP_TYPE map_type) G_percent(row, nrows, 2); if (Rast_get_row_nomask(old, rast, row, map_type) < 0) break; - if (Rast_put_raster_row(new, rast, map_type) < 0) + if (Rast_put_row(new, rast, map_type) < 0) break; } G_free(rast); diff --git a/raster/r.cost/main.c b/raster/r.cost/main.c index 1457c76af13..c239e4881e9 100644 --- a/raster/r.cost/main.c +++ b/raster/r.cost/main.c @@ -1028,7 +1028,7 @@ int main(int argc, char *argv[]) *(p + col) = (int)(min_cost + .5); } } - Rast_put_raster_row(cum_fd, cell, data_type); + Rast_put_row(cum_fd, cell, data_type); } } else if (data_type == FCELL_TYPE) { @@ -1061,7 +1061,7 @@ int main(int argc, char *argv[]) *(p + col) = (float)(min_cost); } } - Rast_put_raster_row(cum_fd, cell, data_type); + Rast_put_row(cum_fd, cell, data_type); } } else if (data_type == DCELL_TYPE) { @@ -1094,7 +1094,7 @@ int main(int argc, char *argv[]) *(p + col) = min_cost; } } - Rast_put_raster_row(cum_fd, cell, data_type); + Rast_put_row(cum_fd, cell, data_type); } } G_percent(1, 1, 1); @@ -1109,7 +1109,7 @@ int main(int argc, char *argv[]) segment_get(&out_seg2, &cur_dir, row, col); *(p + col) = cur_dir; } - Rast_put_raster_row(dir_fd, dir_cell, dir_data_type); + Rast_put_row(dir_fd, dir_cell, dir_data_type); G_percent(row, nrows, 2); } } diff --git a/raster/r.cross/cross.c b/raster/r.cross/cross.c index 8749033fca3..ca58a3476a1 100644 --- a/raster/r.cross/cross.c +++ b/raster/r.cross/cross.c @@ -171,7 +171,7 @@ CELL cross(int fd[], int non_zero, int primary, int outfd) pnode->right = N; /* add right */ } } - Rast_put_raster_row(outfd, result_cell, CELL_TYPE); + Rast_put_row(outfd, result_cell, CELL_TYPE); } G_percent(nrows, nrows, 5); diff --git a/raster/r.cross/renumber.c b/raster/r.cross/renumber.c index 80161ccf259..a3b6e1530c3 100644 --- a/raster/r.cross/renumber.c +++ b/raster/r.cross/renumber.c @@ -40,7 +40,7 @@ int renumber(int in, int out) *c = table[*c]; c++; } - if (Rast_put_raster_row(out, cell, CELL_TYPE) < 0) + if (Rast_put_row(out, cell, CELL_TYPE) < 0) exit(1); } G_percent(row, nrows, 10); diff --git a/raster/r.drain/main.c b/raster/r.drain/main.c index 52abc4c4130..edc2b460514 100644 --- a/raster/r.drain/main.c +++ b/raster/r.drain/main.c @@ -454,7 +454,7 @@ int main(int argc, char **argv) out_buf[thispoint->col] = (int)thispoint->value; thispoint = thispoint->next; } - Rast_put_c_raster_row(new_id, out_buf); + Rast_put_c_row(new_id, out_buf); } G_percent(1, 1, 1); } diff --git a/raster/r.drain/tinf.c b/raster/r.drain/tinf.c index a6c6ef2cfbc..6955110bfa8 100644 --- a/raster/r.drain/tinf.c +++ b/raster/r.drain/tinf.c @@ -215,17 +215,17 @@ int get_row_d(int fd, void *row, int n) /* Write one row to a raster map */ int put_row_c(int fd, void *row) { - return Rast_put_c_raster_row(fd, (CELL *) row); + return Rast_put_c_row(fd, (CELL *) row); } int put_row_f(int fd, void *row) { - return Rast_put_f_raster_row(fd, (FCELL *) row); + return Rast_put_f_row(fd, (FCELL *) row); } int put_row_d(int fd, void *row) { - return Rast_put_d_raster_row(fd, (DCELL *) row); + return Rast_put_d_row(fd, (DCELL *) row); } /* Allocate memory for one line of data */ diff --git a/raster/r.fill.dir/main.c b/raster/r.fill.dir/main.c index 7198b6b30eb..b4808188625 100644 --- a/raster/r.fill.dir/main.c +++ b/raster/r.fill.dir/main.c @@ -265,7 +265,7 @@ int main(int argc, char **argv) for (i = 0; i < nrows; i++) { read(fm, out_buf, bufsz); - Rast_put_raster_row(bas_id, out_buf, CELL_TYPE); + Rast_put_row(bas_id, out_buf, CELL_TYPE); } Rast_close(bas_id); @@ -281,7 +281,7 @@ int main(int argc, char **argv) for (j = 0; j < ncols; j += 1) out_buf[j] = dir_type(type, out_buf[j]); - Rast_put_raster_row(dir_id, out_buf, CELL_TYPE); + Rast_put_row(dir_id, out_buf, CELL_TYPE); } diff --git a/raster/r.fill.dir/tinf.c b/raster/r.fill.dir/tinf.c index 07d1648fadf..5f910000d5a 100644 --- a/raster/r.fill.dir/tinf.c +++ b/raster/r.fill.dir/tinf.c @@ -196,17 +196,17 @@ int get_row_d(int fd, void *row, int n) /* Write one row to a raster map */ int put_row_c(int fd, void *row) { - return Rast_put_c_raster_row(fd, (CELL *) row); + return Rast_put_c_row(fd, (CELL *) row); } int put_row_f(int fd, void *row) { - return Rast_put_f_raster_row(fd, (FCELL *) row); + return Rast_put_f_row(fd, (FCELL *) row); } int put_row_d(int fd, void *row) { - return Rast_put_d_raster_row(fd, (DCELL *) row); + return Rast_put_d_row(fd, (DCELL *) row); } /* Allocate memory for one line of data */ diff --git a/raster/r.flow/io.c b/raster/r.flow/io.c index 242be1f7a75..21460031419 100644 --- a/raster/r.flow/io.c +++ b/raster/r.flow/io.c @@ -204,7 +204,7 @@ void write_density_file(void) G_fatal_error(_("Unable to create raster map <%s>"), parm.dsout); for (row = 0; row < region.rows; row++) { - Rast_put_raster_row(dsfd, get_row(ds, row), DCELL_TYPE); + Rast_put_row(dsfd, get_row(ds, row), DCELL_TYPE); for (col = 0; col < region.cols; col++) if (ds.buf[row][col] > dsmax) dsmax = ds.buf[row][col]; diff --git a/raster/r.flow/main.c b/raster/r.flow/main.c index 6570143a9d7..d3fb704b534 100644 --- a/raster/r.flow/main.c +++ b/raster/r.flow/main.c @@ -385,7 +385,7 @@ static void calculate(void) } if (parm.lgout) - Rast_put_f_raster_row(lgfd, lg); + Rast_put_f_row(lgfd, lg); } G_free(fls.px); diff --git a/raster/r.grow.distance/main.c b/raster/r.grow.distance/main.c index 8f9fbc748cf..d9b8a923fac 100644 --- a/raster/r.grow.distance/main.c +++ b/raster/r.grow.distance/main.c @@ -336,11 +336,11 @@ int main(int argc, char **argv) for (col = 0; col < ncols; col++) out_row[col] *= scale; - Rast_put_d_raster_row(dist_fd, out_row); + Rast_put_d_row(dist_fd, out_row); } if (val_name) - Rast_put_d_raster_row(val_fd, new_val_row); + Rast_put_d_row(val_fd, new_val_row); swap_rows(); } diff --git a/raster/r.grow/main.c b/raster/r.grow/main.c index d73e96755ec..f9befe318ce 100644 --- a/raster/r.grow/main.c +++ b/raster/r.grow/main.c @@ -264,7 +264,7 @@ int main(int argc, char **argv) Rast_set_d_null_value(&out_row[col], 1); } - Rast_put_d_raster_row(out_fd, out_row); + Rast_put_d_row(out_fd, out_row); G_percent(row, nrows, 2); diff --git a/raster/r.his/main.c b/raster/r.his/main.c index b39dab83263..c81b45e3188 100644 --- a/raster/r.his/main.c +++ b/raster/r.his/main.c @@ -257,15 +257,15 @@ int main(int argc, char **argv) } if (r_used) - if (Rast_put_raster_row(r_file, r_array, CELL_TYPE) < 0) + if (Rast_put_row(r_file, r_array, CELL_TYPE) < 0) r_used = 0; if (g_used) - if (Rast_put_raster_row(g_file, g_array, CELL_TYPE) < 0) + if (Rast_put_row(g_file, g_array, CELL_TYPE) < 0) g_used = 0; if (b_used) - if (Rast_put_raster_row(b_file, b_array, CELL_TYPE) < 0) + if (Rast_put_row(b_file, b_array, CELL_TYPE) < 0) b_used = 0; } G_percent(window.rows, window.rows, 5); diff --git a/raster/r.horizon/main.c b/raster/r.horizon/main.c index 7269048a134..b611c40c1af 100644 --- a/raster/r.horizon/main.c +++ b/raster/r.horizon/main.c @@ -642,7 +642,7 @@ int OUTGR(int numrows, int numcols) else cell1[j] = (FCELL) horizon_raster[i][j]; } - Rast_put_f_raster_row(fd1, cell1); + Rast_put_f_row(fd1, cell1); } } /* End loop over rows. */ diff --git a/raster/r.in.arc/main.c b/raster/r.in.arc/main.c index bd067a27c15..a6d89980a93 100644 --- a/raster/r.in.arc/main.c +++ b/raster/r.in.arc/main.c @@ -188,13 +188,13 @@ int main(int argc, char *argv[]) } switch (rtype) { case CELL_TYPE: - Rast_put_c_raster_row(cf, cell); + Rast_put_c_row(cf, cell); break; case FCELL_TYPE: - Rast_put_f_raster_row(cf, fcell); + Rast_put_f_row(cf, fcell); break; case DCELL_TYPE: - Rast_put_d_raster_row(cf, dcell); + Rast_put_d_row(cf, dcell); break; } } diff --git a/raster/r.in.ascii/main.c b/raster/r.in.ascii/main.c index 94b77c348a0..28beb318703 100644 --- a/raster/r.in.ascii/main.c +++ b/raster/r.in.ascii/main.c @@ -246,7 +246,7 @@ int main(int argc, char *argv[]) for (row = 0; row < nrows; row += 1) { fread(rast, Rast_cell_size(data_type), ncols, ft); - Rast_put_raster_row(cf, rast, data_type); + Rast_put_row(cf, rast, data_type); fseek(ft, sz, SEEK_CUR); } fclose(ft); diff --git a/raster/r.in.bin/main.c b/raster/r.in.bin/main.c index 9eceb164fba..2ad766a0507 100644 --- a/raster/r.in.bin/main.c +++ b/raster/r.in.bin/main.c @@ -571,11 +571,11 @@ int main(int argc, char *argv[]) } if (flag.f->answer) - Rast_put_f_raster_row(cf, fcell); + Rast_put_f_row(cf, fcell); else if (flag.d->answer) - Rast_put_d_raster_row(cf, dcell); + Rast_put_d_row(cf, dcell); else - Rast_put_c_raster_row(cf, cell); + Rast_put_c_row(cf, cell); G_percent(row + 1, nrows, 2); } diff --git a/raster/r.in.gdal/main.c b/raster/r.in.gdal/main.c index 7d5c916d346..120b6a50be2 100644 --- a/raster/r.in.gdal/main.c +++ b/raster/r.in.gdal/main.c @@ -792,8 +792,8 @@ static void ImportBand(GDALRasterBandH hBand, const char *output, bufComplex[indx * 2 + 1]; } } - Rast_put_raster_row(cfR, cellReal, data_type); - Rast_put_raster_row(cfI, cellImg, data_type); + Rast_put_row(cfR, cellReal, data_type); + Rast_put_row(cfI, cellImg, data_type); } /* end of complex */ else { /* single band */ GDALRasterIO(hBand, GF_Read, 0, row - 1, ncols, 1, @@ -820,7 +820,7 @@ static void ImportBand(GDALRasterBandH hBand, const char *output, Rast_insert_null_values(cell, nullFlags, ncols, data_type); } - Rast_put_raster_row(cf, cell, data_type); + Rast_put_row(cf, cell, data_type); } /* end of not complex */ G_percent(row, nrows, 2); @@ -853,7 +853,7 @@ static void ImportBand(GDALRasterBandH hBand, const char *output, Rast_insert_null_values(cell, nullFlags, ncols, data_type); } - Rast_put_raster_row(cf, cell, data_type); + Rast_put_row(cf, cell, data_type); } G_percent(row, nrows, 2); diff --git a/raster/r.in.gridatb/file_io.c b/raster/r.in.gridatb/file_io.c index 77c9ae71cea..1bd4ea514da 100644 --- a/raster/r.in.gridatb/file_io.c +++ b/raster/r.in.gridatb/file_io.c @@ -60,7 +60,7 @@ void rdwr_gridatb(void) cell[j] = idx; } } - Rast_put_f_raster_row(fd, cell); + Rast_put_f_row(fd, cell); } G_percent(i, cellhd.rows, 2); fclose(fp); diff --git a/raster/r.in.mat/main.c b/raster/r.in.mat/main.c index bdb00861671..e3c09edaeab 100644 --- a/raster/r.in.mat/main.c +++ b/raster/r.in.mat/main.c @@ -470,7 +470,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "]\n"); #endif - if (1 != Rast_put_raster_row(cf, raster, map_type)) { + if (1 != Rast_put_row(cf, raster, map_type)) { Rast_close(cf); G_fatal_error(_("Writing raster map, row %d"), row); } diff --git a/raster/r.in.poly/raster.c b/raster/r.in.poly/raster.c index 566a904f324..3af7422d6eb 100644 --- a/raster/r.in.poly/raster.c +++ b/raster/r.in.poly/raster.c @@ -186,7 +186,7 @@ int output_raster(int fd) } G_percent(i, page.rows, 2); - if (Rast_put_raster_row(fd, cell, CELL_TYPE) < 0) + if (Rast_put_row(fd, cell, CELL_TYPE) < 0) return ERROR; } G_percent(i, page.rows, 2); diff --git a/raster/r.in.xyz/main.c b/raster/r.in.xyz/main.c index 0ba6e635e3a..90df0129d3b 100644 --- a/raster/r.in.xyz/main.c +++ b/raster/r.in.xyz/main.c @@ -1011,7 +1011,7 @@ int main(int argc, char *argv[]) } /* write out line of raster data */ - if (1 != Rast_put_raster_row(out_fd, raster_row, rtype)) { + if (1 != Rast_put_row(out_fd, raster_row, rtype)) { Rast_close(out_fd); G_fatal_error(_("Writing map, row %d"), ((pass - 1) * rows) + row); diff --git a/raster/r.lake/main.c b/raster/r.lake/main.c index fd78520609d..be3824cf131 100644 --- a/raster/r.lake/main.c +++ b/raster/r.lake/main.c @@ -76,7 +76,7 @@ void save_map(FCELL ** out, int out_fd, int rows, int cols, int flag, if (out[row][col] < *min_depth) *min_depth = out[row][col]; } - if (Rast_put_f_raster_row(out_fd, out[row]) == -1) + if (Rast_put_f_row(out_fd, out[row]) == -1) G_fatal_error(_("Failed writing output raster map row %d"), row); G_percent(row + 1, rows, 5); } diff --git a/raster/r.le/r.le.patch/driver.c b/raster/r.le/r.le.patch/driver.c index baff6edd9f6..67619e65603 100644 --- a/raster/r.le/r.le.patch/driver.c +++ b/raster/r.le/r.le.patch/driver.c @@ -1014,20 +1014,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a1, tmp_buf); + Rast_put_d_row(a1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 0) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 0); } - Rast_put_d_raster_row(a1, tmp_buf); + Rast_put_d_row(a1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a1, tmp_buf2); + Rast_put_d_row(a1, tmp_buf2); G_free(tmp_buf2); } } @@ -1037,20 +1037,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a2, tmp_buf); + Rast_put_d_row(a2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 1) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 1); } - Rast_put_d_raster_row(a2, tmp_buf); + Rast_put_d_row(a2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a2, tmp_buf2); + Rast_put_d_row(a2, tmp_buf2); G_free(tmp_buf2); } } @@ -1059,20 +1059,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a3, tmp_buf); + Rast_put_d_row(a3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 2) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 2); } - Rast_put_d_raster_row(a3, tmp_buf); + Rast_put_d_row(a3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a3, tmp_buf2); + Rast_put_d_row(a3, tmp_buf2); G_free(tmp_buf2); } } @@ -1081,20 +1081,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a4, tmp_buf); + Rast_put_d_row(a4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 3) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 3); } - Rast_put_d_raster_row(a4, tmp_buf); + Rast_put_d_row(a4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a4, tmp_buf2); + Rast_put_d_row(a4, tmp_buf2); G_free(tmp_buf2); } } @@ -1103,20 +1103,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a5, tmp_buf); + Rast_put_d_row(a5, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 4) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 4); } - Rast_put_d_raster_row(a5, tmp_buf); + Rast_put_d_row(a5, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a5, tmp_buf2); + Rast_put_d_row(a5, tmp_buf2); G_free(tmp_buf2); } } @@ -1125,20 +1125,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a6, tmp_buf); + Rast_put_d_row(a6, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 5) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 5); } - Rast_put_d_raster_row(a6, tmp_buf); + Rast_put_d_row(a6, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a6, tmp_buf2); + Rast_put_d_row(a6, tmp_buf2); G_free(tmp_buf2); } } @@ -1147,20 +1147,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a7, tmp_buf); + Rast_put_d_row(a7, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 6) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 6); } - Rast_put_d_raster_row(a7, tmp_buf); + Rast_put_d_row(a7, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a7, tmp_buf2); + Rast_put_d_row(a7, tmp_buf2); G_free(tmp_buf2); } } @@ -1169,20 +1169,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s1, tmp_buf); + Rast_put_d_row(s1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 7) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 7); } - Rast_put_d_raster_row(s1, tmp_buf); + Rast_put_d_row(s1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s1, tmp_buf2); + Rast_put_d_row(s1, tmp_buf2); G_free(tmp_buf2); } } @@ -1191,20 +1191,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s2, tmp_buf); + Rast_put_d_row(s2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 8) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 8); } - Rast_put_d_raster_row(s2, tmp_buf); + Rast_put_d_row(s2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s2, tmp_buf2); + Rast_put_d_row(s2, tmp_buf2); G_free(tmp_buf2); } } @@ -1213,20 +1213,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s3, tmp_buf); + Rast_put_d_row(s3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 9) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 9); } - Rast_put_d_raster_row(s3, tmp_buf); + Rast_put_d_row(s3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s3, tmp_buf2); + Rast_put_d_row(s3, tmp_buf2); G_free(tmp_buf2); } } @@ -1235,20 +1235,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s4, tmp_buf); + Rast_put_d_row(s4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 10) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 10); } - Rast_put_d_raster_row(s4, tmp_buf); + Rast_put_d_row(s4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s4, tmp_buf2); + Rast_put_d_row(s4, tmp_buf2); G_free(tmp_buf2); } } @@ -1257,20 +1257,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s5, tmp_buf); + Rast_put_d_row(s5, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 11) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 11); } - Rast_put_d_raster_row(s5, tmp_buf); + Rast_put_d_row(s5, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s5, tmp_buf2); + Rast_put_d_row(s5, tmp_buf2); G_free(tmp_buf2); } } @@ -1279,20 +1279,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s6, tmp_buf); + Rast_put_d_row(s6, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 12) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 12); } - Rast_put_d_raster_row(s6, tmp_buf); + Rast_put_d_row(s6, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s6, tmp_buf2); + Rast_put_d_row(s6, tmp_buf2); G_free(tmp_buf2); } } @@ -1301,20 +1301,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c1, tmp_buf); + Rast_put_d_row(c1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 13) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 13); } - Rast_put_d_raster_row(c1, tmp_buf); + Rast_put_d_row(c1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c1, tmp_buf2); + Rast_put_d_row(c1, tmp_buf2); G_free(tmp_buf2); } } @@ -1323,20 +1323,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c2, tmp_buf); + Rast_put_d_row(c2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 14) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 14); } - Rast_put_d_raster_row(c2, tmp_buf); + Rast_put_d_row(c2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c2, tmp_buf2); + Rast_put_d_row(c2, tmp_buf2); G_free(tmp_buf2); } } @@ -1345,20 +1345,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c3, tmp_buf); + Rast_put_d_row(c3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 15) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 15); } - Rast_put_d_raster_row(c3, tmp_buf); + Rast_put_d_row(c3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c3, tmp_buf2); + Rast_put_d_row(c3, tmp_buf2); G_free(tmp_buf2); } } @@ -1367,20 +1367,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c4, tmp_buf); + Rast_put_d_row(c4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 16) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 16); } - Rast_put_d_raster_row(c4, tmp_buf); + Rast_put_d_row(c4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c4, tmp_buf2); + Rast_put_d_row(c4, tmp_buf2); G_free(tmp_buf2); } } @@ -1389,20 +1389,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c5, tmp_buf); + Rast_put_d_row(c5, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 17) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 17); } - Rast_put_d_raster_row(c5, tmp_buf); + Rast_put_d_row(c5, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c5, tmp_buf2); + Rast_put_d_row(c5, tmp_buf2); G_free(tmp_buf2); } } @@ -1411,20 +1411,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c6, tmp_buf); + Rast_put_d_row(c6, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 18) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 18); } - Rast_put_d_raster_row(c6, tmp_buf); + Rast_put_d_row(c6, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c6, tmp_buf2); + Rast_put_d_row(c6, tmp_buf2); G_free(tmp_buf2); } } @@ -1433,20 +1433,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c7, tmp_buf); + Rast_put_d_row(c7, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 19) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 19); } - Rast_put_d_raster_row(c7, tmp_buf); + Rast_put_d_row(c7, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c7, tmp_buf2); + Rast_put_d_row(c7, tmp_buf2); G_free(tmp_buf2); } } @@ -1455,20 +1455,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c8, tmp_buf); + Rast_put_d_row(c8, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 20) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 20); } - Rast_put_d_raster_row(c8, tmp_buf); + Rast_put_d_row(c8, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c8, tmp_buf2); + Rast_put_d_row(c8, tmp_buf2); G_free(tmp_buf2); } } @@ -1477,20 +1477,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c9, tmp_buf); + Rast_put_d_row(c9, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 21) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 21); } - Rast_put_d_raster_row(c9, tmp_buf); + Rast_put_d_row(c9, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c9, tmp_buf2); + Rast_put_d_row(c9, tmp_buf2); G_free(tmp_buf2); } } @@ -1499,20 +1499,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c10, tmp_buf); + Rast_put_d_row(c10, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 22) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 22); } - Rast_put_d_raster_row(c10, tmp_buf); + Rast_put_d_row(c10, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(c10, tmp_buf2); + Rast_put_d_row(c10, tmp_buf2); G_free(tmp_buf2); } } @@ -1521,20 +1521,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h1, tmp_buf); + Rast_put_d_row(h1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 23) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 23); } - Rast_put_d_raster_row(h1, tmp_buf); + Rast_put_d_row(h1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h1, tmp_buf2); + Rast_put_d_row(h1, tmp_buf2); G_free(tmp_buf2); } } @@ -1543,20 +1543,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h2, tmp_buf); + Rast_put_d_row(h2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 24) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 24); } - Rast_put_d_raster_row(h2, tmp_buf); + Rast_put_d_row(h2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h2, tmp_buf2); + Rast_put_d_row(h2, tmp_buf2); G_free(tmp_buf2); } } @@ -1565,20 +1565,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h3, tmp_buf); + Rast_put_d_row(h3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 25) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 25); } - Rast_put_d_raster_row(h3, tmp_buf); + Rast_put_d_row(h3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h3, tmp_buf2); + Rast_put_d_row(h3, tmp_buf2); G_free(tmp_buf2); } } @@ -1587,20 +1587,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h4, tmp_buf); + Rast_put_d_row(h4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 26) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 26); } - Rast_put_d_raster_row(h4, tmp_buf); + Rast_put_d_row(h4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h4, tmp_buf2); + Rast_put_d_row(h4, tmp_buf2); G_free(tmp_buf2); } } @@ -1609,20 +1609,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h5, tmp_buf); + Rast_put_d_row(h5, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 27) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 27); } - Rast_put_d_raster_row(h5, tmp_buf); + Rast_put_d_row(h5, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h5, tmp_buf2); + Rast_put_d_row(h5, tmp_buf2); G_free(tmp_buf2); } } @@ -1631,20 +1631,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h6, tmp_buf); + Rast_put_d_row(h6, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 28) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 28); } - Rast_put_d_raster_row(h6, tmp_buf); + Rast_put_d_row(h6, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(h6, tmp_buf2); + Rast_put_d_row(h6, tmp_buf2); G_free(tmp_buf2); } } @@ -1653,20 +1653,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n1, tmp_buf); + Rast_put_d_row(n1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 29) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 29); } - Rast_put_d_raster_row(n1, tmp_buf); + Rast_put_d_row(n1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n1, tmp_buf2); + Rast_put_d_row(n1, tmp_buf2); G_free(tmp_buf2); } } @@ -1675,20 +1675,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p1, tmp_buf); + Rast_put_d_row(p1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 30) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 30); } - Rast_put_d_raster_row(p1, tmp_buf); + Rast_put_d_row(p1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p1, tmp_buf2); + Rast_put_d_row(p1, tmp_buf2); G_free(tmp_buf2); } } @@ -1697,20 +1697,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p2, tmp_buf); + Rast_put_d_row(p2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 31) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 31); } - Rast_put_d_raster_row(p2, tmp_buf); + Rast_put_d_row(p2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p2, tmp_buf2); + Rast_put_d_row(p2, tmp_buf2); G_free(tmp_buf2); } } @@ -1719,20 +1719,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p3, tmp_buf); + Rast_put_d_row(p3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 32) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 32); } - Rast_put_d_raster_row(p3, tmp_buf); + Rast_put_d_row(p3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p3, tmp_buf2); + Rast_put_d_row(p3, tmp_buf2); G_free(tmp_buf2); } } @@ -1741,20 +1741,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p4, tmp_buf); + Rast_put_d_row(p4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 33) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 33); } - Rast_put_d_raster_row(p4, tmp_buf); + Rast_put_d_row(p4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p4, tmp_buf2); + Rast_put_d_row(p4, tmp_buf2); G_free(tmp_buf2); } } @@ -1763,20 +1763,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p5, tmp_buf); + Rast_put_d_row(p5, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 34) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 34); } - Rast_put_d_raster_row(p5, tmp_buf); + Rast_put_d_row(p5, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p5, tmp_buf2); + Rast_put_d_row(p5, tmp_buf2); G_free(tmp_buf2); } } @@ -1785,20 +1785,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p6, tmp_buf); + Rast_put_d_row(p6, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 35) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 35); } - Rast_put_d_raster_row(p6, tmp_buf); + Rast_put_d_row(p6, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(p6, tmp_buf2); + Rast_put_d_row(p6, tmp_buf2); G_free(tmp_buf2); } } @@ -1808,20 +1808,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a8, tmp_buf); + Rast_put_d_row(a8, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 36) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 36); } - Rast_put_d_raster_row(a8, tmp_buf); + Rast_put_d_row(a8, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(a8, tmp_buf2); + Rast_put_d_row(a8, tmp_buf2); G_free(tmp_buf2); } } @@ -1831,20 +1831,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s7, tmp_buf); + Rast_put_d_row(s7, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 37) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 37); } - Rast_put_d_raster_row(s7, tmp_buf); + Rast_put_d_row(s7, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s7, tmp_buf2); + Rast_put_d_row(s7, tmp_buf2); G_free(tmp_buf2); } } @@ -1854,20 +1854,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s8, tmp_buf); + Rast_put_d_row(s8, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 38) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 38); } - Rast_put_d_raster_row(s8, tmp_buf); + Rast_put_d_row(s8, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(s8, tmp_buf2); + Rast_put_d_row(s8, tmp_buf2); G_free(tmp_buf2); } } @@ -1877,20 +1877,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n2, tmp_buf); + Rast_put_d_row(n2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 39) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 39); } - Rast_put_d_raster_row(n2, tmp_buf); + Rast_put_d_row(n2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n2, tmp_buf2); + Rast_put_d_row(n2, tmp_buf2); G_free(tmp_buf2); } } @@ -1900,20 +1900,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n3, tmp_buf); + Rast_put_d_row(n3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 40) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 40); } - Rast_put_d_raster_row(n3, tmp_buf); + Rast_put_d_row(n3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n3, tmp_buf2); + Rast_put_d_row(n3, tmp_buf2); G_free(tmp_buf2); } } @@ -1923,20 +1923,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n4, tmp_buf); + Rast_put_d_row(n4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 41) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 41); } - Rast_put_d_raster_row(n4, tmp_buf); + Rast_put_d_row(n4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(n4, tmp_buf2); + Rast_put_d_row(n4, tmp_buf2); G_free(tmp_buf2); } } @@ -2711,7 +2711,7 @@ void unit_driver() if (*(*(units + k) + m)) *(unit_buf + m - 1) = *(*(units + k) + m); } - Rast_put_raster_row(fd, unit_buf, CELL_TYPE); + Rast_put_row(fd, unit_buf, CELL_TYPE); } Rast_close(fd); G_free(unit_buf); diff --git a/raster/r.le/r.le.patch/trace.c b/raster/r.le/r.le.patch/trace.c index e76b1b3b2a6..7aa0a318a93 100644 --- a/raster/r.le/r.le.patch/trace.c +++ b/raster/r.le/r.le.patch/trace.c @@ -216,7 +216,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value, for (j = 1; j < ncols + 1; j++) *(cor_cell_buf + j - 1) = (int)(*(*(cor + i) + j)); - if (Rast_put_raster_row(fe, cor_cell_buf, CELL_TYPE) < 0) + if (Rast_put_row(fe, cor_cell_buf, CELL_TYPE) < 0) exit(EXIT_FAILURE); Rast_update_cell_stats(cor_cell_buf, ncols + 1, &stats); @@ -231,7 +231,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value, *(cor_fcell_buf + j - 1) = (float)(*(*(cor + i) + j)); } - if (Rast_put_raster_row(fe, cor_fcell_buf, FCELL_TYPE) < 0) + if (Rast_put_row(fe, cor_fcell_buf, FCELL_TYPE) < 0) exit(EXIT_FAILURE); } break; @@ -243,7 +243,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value, for (j = 1; j < ncols + 1; j++) *(cor_dcell_buf + j - 1) = (double)(*(*(cor + i) + j)); - if (Rast_put_raster_row(fe, cor_dcell_buf, DCELL_TYPE) < 0) + if (Rast_put_row(fe, cor_dcell_buf, DCELL_TYPE) < 0) exit(EXIT_FAILURE); } break; @@ -262,7 +262,7 @@ void cell_clip_drv(int col0, int row0, int ncols, int nrows, double **value, for (j = 1; j < ncols + 1; j++) *(pat_buf + j - 1) = *(*(pat + i) + j); - if (Rast_put_raster_row(fd, pat_buf, CELL_TYPE) < 0) + if (Rast_put_row(fd, pat_buf, CELL_TYPE) < 0) exit(EXIT_FAILURE); } } diff --git a/raster/r.le/r.le.pixel/driver.c b/raster/r.le/r.le.pixel/driver.c index 81c8856d8ea..42112791a2c 100644 --- a/raster/r.le/r.le.pixel/driver.c +++ b/raster/r.le/r.le.pixel/driver.c @@ -586,20 +586,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b1, tmp_buf); + Rast_put_d_row(b1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 0) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 0); } - Rast_put_d_raster_row(b1, tmp_buf); + Rast_put_d_row(b1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b1, tmp_buf2); + Rast_put_d_row(b1, tmp_buf2); G_free(tmp_buf2); } } @@ -608,20 +608,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b2, tmp_buf); + Rast_put_d_row(b2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 1) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 1); } - Rast_put_d_raster_row(b2, tmp_buf); + Rast_put_d_row(b2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b2, tmp_buf2); + Rast_put_d_row(b2, tmp_buf2); G_free(tmp_buf2); } } @@ -630,20 +630,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b3, tmp_buf); + Rast_put_d_row(b3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 2) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 2); } - Rast_put_d_raster_row(b3, tmp_buf); + Rast_put_d_row(b3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b3, tmp_buf2); + Rast_put_d_row(b3, tmp_buf2); G_free(tmp_buf2); } } @@ -652,20 +652,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b4, tmp_buf); + Rast_put_d_row(b4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 3) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 3); } - Rast_put_d_raster_row(b4, tmp_buf); + Rast_put_d_row(b4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(b4, tmp_buf2); + Rast_put_d_row(b4, tmp_buf2); G_free(tmp_buf2); } } @@ -674,20 +674,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d1, tmp_buf); + Rast_put_d_row(d1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 4) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 4); } - Rast_put_d_raster_row(d1, tmp_buf); + Rast_put_d_row(d1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d1, tmp_buf2); + Rast_put_d_row(d1, tmp_buf2); G_free(tmp_buf2); } } @@ -696,20 +696,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d2, tmp_buf); + Rast_put_d_row(d2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 5) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 5); } - Rast_put_d_raster_row(d2, tmp_buf); + Rast_put_d_row(d2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d2, tmp_buf2); + Rast_put_d_row(d2, tmp_buf2); G_free(tmp_buf2); } } @@ -718,20 +718,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d3, tmp_buf); + Rast_put_d_row(d3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 6) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 6); } - Rast_put_d_raster_row(d3, tmp_buf); + Rast_put_d_row(d3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d3, tmp_buf2); + Rast_put_d_row(d3, tmp_buf2); G_free(tmp_buf2); } } @@ -740,20 +740,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d4, tmp_buf); + Rast_put_d_row(d4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 7) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 7); } - Rast_put_d_raster_row(d4, tmp_buf); + Rast_put_d_row(d4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(d4, tmp_buf2); + Rast_put_d_row(d4, tmp_buf2); G_free(tmp_buf2); } } @@ -762,20 +762,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t1, tmp_buf); + Rast_put_d_row(t1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 8) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 8); } - Rast_put_d_raster_row(t1, tmp_buf); + Rast_put_d_row(t1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t1, tmp_buf2); + Rast_put_d_row(t1, tmp_buf2); G_free(tmp_buf2); } } @@ -784,20 +784,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t2, tmp_buf); + Rast_put_d_row(t2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 9) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 9); } - Rast_put_d_raster_row(t2, tmp_buf); + Rast_put_d_row(t2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t2, tmp_buf2); + Rast_put_d_row(t2, tmp_buf2); G_free(tmp_buf2); } } @@ -806,20 +806,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t3, tmp_buf); + Rast_put_d_row(t3, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 10) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 10); } - Rast_put_d_raster_row(t3, tmp_buf); + Rast_put_d_row(t3, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t3, tmp_buf2); + Rast_put_d_row(t3, tmp_buf2); G_free(tmp_buf2); } } @@ -828,20 +828,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t4, tmp_buf); + Rast_put_d_row(t4, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 11) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 11); } - Rast_put_d_raster_row(t4, tmp_buf); + Rast_put_d_row(t4, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t4, tmp_buf2); + Rast_put_d_row(t4, tmp_buf2); G_free(tmp_buf2); } } @@ -850,20 +850,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t5, tmp_buf); + Rast_put_d_row(t5, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 12) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 12); } - Rast_put_d_raster_row(t5, tmp_buf); + Rast_put_d_row(t5, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(t5, tmp_buf2); + Rast_put_d_row(t5, tmp_buf2); G_free(tmp_buf2); } } @@ -872,20 +872,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(j1, tmp_buf); + Rast_put_d_row(j1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 13) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 13); } - Rast_put_d_raster_row(j1, tmp_buf); + Rast_put_d_row(j1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(j1, tmp_buf2); + Rast_put_d_row(j1, tmp_buf2); G_free(tmp_buf2); } } @@ -894,20 +894,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(j2, tmp_buf); + Rast_put_d_row(j2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 14) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 14); } - Rast_put_d_raster_row(j2, tmp_buf); + Rast_put_d_row(j2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(j2, tmp_buf2); + Rast_put_d_row(j2, tmp_buf2); G_free(tmp_buf2); } } @@ -916,20 +916,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(e1, tmp_buf); + Rast_put_d_row(e1, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 15) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 15); } - Rast_put_d_raster_row(e1, tmp_buf); + Rast_put_d_row(e1, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(e1, tmp_buf2); + Rast_put_d_row(e1, tmp_buf2); G_free(tmp_buf2); } } @@ -938,20 +938,20 @@ void mv_driver() Rast_set_null_value(tmp_buf, x0 + nc + u_w, DCELL_TYPE); if (i == 0) { for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(e2, tmp_buf); + Rast_put_d_row(e2, tmp_buf); } if (i < nr) { for (m = 0; m < nc; m++) { if (*(*(buff + m) + 16) > -BIG) *(tmp_buf + (x0 + m + u_w / 2)) = *(*(buff + m) + 16); } - Rast_put_d_raster_row(e2, tmp_buf); + Rast_put_d_row(e2, tmp_buf); } if (i == nr - 1) { tmp_buf2 = Rast_allocate_buf(DCELL_TYPE); Rast_set_null_value(tmp_buf2, x0 + nc + u_w, DCELL_TYPE); for (b = 0; b < u_l / 2; b++) - Rast_put_d_raster_row(e2, tmp_buf2); + Rast_put_d_row(e2, tmp_buf2); G_free(tmp_buf2); } } @@ -1533,7 +1533,7 @@ void unit_driver() if (*(*(units + k) + m)) *(unit_buf + m - 1) = *(*(units + k) + m); } - Rast_put_raster_row(fd, unit_buf, CELL_TYPE); + Rast_put_row(fd, unit_buf, CELL_TYPE); } Rast_close(fd); G_free(unit_buf); diff --git a/raster/r.le/r.le.pixel/texture.c b/raster/r.le/r.le.pixel/texture.c index 93c5d2000c9..189c387a831 100644 --- a/raster/r.le/r.le.pixel/texture.c +++ b/raster/r.le/r.le.pixel/texture.c @@ -475,7 +475,7 @@ void df_texture(int nrows, int ncols, double **buf, double **null_buf, if (*(*(edgenull + i) + j) == 0) *(edge_buf_c + j - 1) = edgemap_c[i][j]; } - Rast_put_raster_row(fc, edge_buf_c, CELL_TYPE); + Rast_put_row(fc, edge_buf_c, CELL_TYPE); } break; case (FCELL_TYPE): @@ -487,7 +487,7 @@ void df_texture(int nrows, int ncols, double **buf, double **null_buf, if (*(*(edgenull + i) + j) == 0) *(edge_buf_f + j - 1) = edgemap_f[i][j]; } - Rast_put_raster_row(fc, edge_buf_f, FCELL_TYPE); + Rast_put_row(fc, edge_buf_f, FCELL_TYPE); } break; case (DCELL_TYPE): @@ -499,7 +499,7 @@ void df_texture(int nrows, int ncols, double **buf, double **null_buf, if (*(*(edgenull + i) + j) == 0) *(edge_buf_d + j - 1) = edgemap_d[i][j]; } - Rast_put_raster_row(fc, edge_buf_d, DCELL_TYPE); + Rast_put_row(fc, edge_buf_d, DCELL_TYPE); } break; } @@ -544,7 +544,7 @@ void df_texture(int nrows, int ncols, double **buf, double **null_buf, *(zscor_buf + j - 1) = (buf[i][j] - attr[0]) / attr[1]; } - Rast_put_raster_row(fd, zscor_buf, DCELL_TYPE); + Rast_put_row(fd, zscor_buf, DCELL_TYPE); } G_free(zscor_buf); Rast_close(fd); diff --git a/raster/r.le/r.le.setup/polytocell/bmf_to_cll.c b/raster/r.le/r.le.setup/polytocell/bmf_to_cll.c index 5e515903fb1..3dc33ae3344 100644 --- a/raster/r.le/r.le.setup/polytocell/bmf_to_cll.c +++ b/raster/r.le/r.le.setup/polytocell/bmf_to_cll.c @@ -91,7 +91,7 @@ int main(argc, argv) if (cur_row > num_rows) { while (atrow < num_rows) { - Rast_put_map_row(newmap, record); + Rast_put_c_row(newmap, record); atrow++; } Rast_close(newmap); @@ -101,7 +101,7 @@ int main(argc, argv) /* write out enough rows to get to current row */ while (atrow < cur_row + ROW_SHIFT) { - Rast_put_map_row(newmap, record); + Rast_put_c_row(newmap, record); atrow++; } @@ -114,7 +114,7 @@ int main(argc, argv) } while (cur_row == (atrow - ROW_SHIFT)); - Rast_put_map_row(newmap, record); + Rast_put_c_row(newmap, record); } fprintf(stderr, "Close: %d\n", Rast_close(newmap)); diff --git a/raster/r.li/r.li.daemon/daemon.c b/raster/r.li/r.li.daemon/daemon.c index 08bc16173b5..591f7443761 100644 --- a/raster/r.li/r.li.daemon/daemon.c +++ b/raster/r.li/r.li.daemon/daemon.c @@ -690,7 +690,7 @@ int write_raster(int mv_fd, int random_access, g_areas g) cell_buf = Rast_allocate_d_buf(); Rast_set_d_null_value(cell_buf, G_window_cols() + 1); for (i = 0; i < g->sf_y + ((int)g->rl / 2); i++) { - Rast_put_raster_row(mv_fd, cell_buf, DCELL_TYPE); + Rast_put_row(mv_fd, cell_buf, DCELL_TYPE); } for (i = 0; i < rows; i++) { letti = read(random_access, file_buf, (cols * sizeof(double))); @@ -699,10 +699,10 @@ int write_raster(int mv_fd, int random_access, g_areas g) for (j = 0; j < cols; j++) { cell_buf[j + center] = file_buf[j]; } - Rast_put_raster_row(mv_fd, cell_buf, DCELL_TYPE); + Rast_put_row(mv_fd, cell_buf, DCELL_TYPE); } Rast_set_d_null_value(cell_buf, G_window_cols() + 1); for (i = 0; i < G_window_rows() - g->sf_y - g->rows; i++) - Rast_put_raster_row(mv_fd, cell_buf, DCELL_TYPE); + Rast_put_row(mv_fd, cell_buf, DCELL_TYPE); return 1; } diff --git a/raster/r.los/main.c b/raster/r.los/main.c index ab64f107b4a..5f769f6ec56 100644 --- a/raster/r.los/main.c +++ b/raster/r.los/main.c @@ -383,7 +383,7 @@ int main(int argc, char *argv[]) /* set to NULL if beyond max_dist (0) or blocked view (1) */ if (fcell[col] == 0 || fcell[col] == 1) Rast_set_null_value(&fcell[col], 1, FCELL_TYPE); - if (Rast_put_raster_row(new, fcell, FCELL_TYPE) < 0) + if (Rast_put_row(new, fcell, FCELL_TYPE) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), out_layer, row); } diff --git a/raster/r.mapcalc/map.c b/raster/r.mapcalc/map.c index 2589d05f994..fa269fedc6b 100644 --- a/raster/r.mapcalc/map.c +++ b/raster/r.mapcalc/map.c @@ -669,7 +669,7 @@ int open_output_map(const char *name, int res_type) void put_map_row(int fd, void *buf, int res_type) { - if (Rast_put_raster_row(fd, buf, res_type) < 0) + if (Rast_put_row(fd, buf, res_type) < 0) G_fatal_error(_("Failed writing raster map row")); } diff --git a/raster/r.mfilter/perform.c b/raster/r.mfilter/perform.c index d7915fd9b08..e079178f3be 100644 --- a/raster/r.mfilter/perform.c +++ b/raster/r.mfilter/perform.c @@ -87,7 +87,7 @@ int perform_filter(const char *in_name, const char *out_name, G_message(_("Writing raster map <%s>"), out_name); for (row = 0; row < nrows; row++) { getrow(in, cell, row, buflen); - Rast_put_d_raster_row(out, cell); + Rast_put_d_row(out, cell); } /* remove the temporary files before closing so that the Rast_close() diff --git a/raster/r.neighbors/main.c b/raster/r.neighbors/main.c index a16f9eb4dec..878a09c163b 100644 --- a/raster/r.neighbors/main.c +++ b/raster/r.neighbors/main.c @@ -326,7 +326,7 @@ int main(int argc, char *argv[]) *rp += 0.5; } } - Rast_put_d_raster_row(out_fd, result); + Rast_put_d_row(out_fd, result); } G_percent(row, nrows, 2); diff --git a/raster/r.null/main.c b/raster/r.null/main.c index b307411f874..a3c90efe68a 100644 --- a/raster/r.null/main.c +++ b/raster/r.null/main.c @@ -339,7 +339,7 @@ int doit(const char *name, const char *mapset, int change_null, RASTER_MAP_TYPE mask_raster_array(rast, cellhd.cols, change_null, map_type); - if (Rast_put_raster_row(new, rast, map_type) < 0) { + if (Rast_put_row(new, rast, map_type) < 0) { G_warning(_("Failed writing raster map <%s> row %d"), name, row); break; diff --git a/raster/r.param.scale/process.c b/raster/r.param.scale/process.c index 67fdf3116e5..1db4b6dd5d8 100644 --- a/raster/r.param.scale/process.c +++ b/raster/r.param.scale/process.c @@ -147,10 +147,10 @@ void process(void) if (mparam != FEATURE) for (wind_row = 0; wind_row < EDGE; wind_row++) - Rast_put_raster_row(fd_out, row_out, DCELL_TYPE); /* Write out the edge cells as NULL. */ + Rast_put_row(fd_out, row_out, DCELL_TYPE); /* Write out the edge cells as NULL. */ else for (wind_row = 0; wind_row < EDGE; wind_row++) - Rast_put_raster_row(fd_out, featrow_out, CELL_TYPE); /* Write out the edge cells as NULL. */ + Rast_put_row(fd_out, featrow_out, CELL_TYPE); /* Write out the edge cells as NULL. */ for (wind_row = 0; wind_row < wsize - 1; wind_row++) Rast_get_row(fd_in, row_in + (wind_row * ncols), wind_row, @@ -211,10 +211,10 @@ void process(void) } if (mparam != FEATURE) - Rast_put_raster_row(fd_out, row_out, DCELL_TYPE); /* Write the row buffer to the output */ + Rast_put_row(fd_out, row_out, DCELL_TYPE); /* Write the row buffer to the output */ /* raster. */ else /* write FEATURE to CELL */ - Rast_put_raster_row(fd_out, featrow_out, CELL_TYPE); /* Write the row buffer to the output */ + Rast_put_row(fd_out, featrow_out, CELL_TYPE); /* Write the row buffer to the output */ /* raster. */ /* 'Shuffle' rows down one, and read in */ @@ -227,9 +227,9 @@ void process(void) for (wind_row = 0; wind_row < EDGE; wind_row++) { if (mparam != FEATURE) - Rast_put_raster_row(fd_out, row_out, DCELL_TYPE); /* Write out the edge cells as NULL. */ + Rast_put_row(fd_out, row_out, DCELL_TYPE); /* Write out the edge cells as NULL. */ else - Rast_put_raster_row(fd_out, featrow_out, CELL_TYPE); /* Write out the edge cells as NULL. */ + Rast_put_row(fd_out, featrow_out, CELL_TYPE); /* Write out the edge cells as NULL. */ } /*--------------------------------------------------------------------------*/ diff --git a/raster/r.patch/main.c b/raster/r.patch/main.c index b9f1f84d120..33a0bcdd9c6 100644 --- a/raster/r.patch/main.c +++ b/raster/r.patch/main.c @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) (presult, patch, &statf[i], ncols, out_type, ZEROFLAG)) break; } - Rast_put_raster_row(outfd, presult, out_type); + Rast_put_row(outfd, presult, out_type); } G_percent(row, nrows, 2); diff --git a/raster/r.proj/main.c b/raster/r.proj/main.c index 6d4a3dc9c81..1ce1d62db4d 100644 --- a/raster/r.proj/main.c +++ b/raster/r.proj/main.c @@ -438,7 +438,7 @@ int main(int argc, char **argv) ycoord1 = ycoord2; } - if (Rast_put_raster_row(fdo, obuffer, cell_type) < 0) + if (Rast_put_row(fdo, obuffer, cell_type) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), mapname, row); diff --git a/raster/r.random.cells/indep.c b/raster/r.random.cells/indep.c index d1ac3a3b19e..f11f8f938da 100644 --- a/raster/r.random.cells/indep.c +++ b/raster/r.random.cells/indep.c @@ -141,7 +141,7 @@ void Indep(void) for (C = 0; C < Cs; C++) { CellBuffer[C] = Out[R][C]; } - Rast_put_raster_row(OutFD, CellBuffer, CELL_TYPE); + Rast_put_row(OutFD, CellBuffer, CELL_TYPE); } G_percent(1, 1, 1); diff --git a/raster/r.random.surface/save.c b/raster/r.random.surface/save.c index 53f1fc576c6..24fd9b253a9 100644 --- a/raster/r.random.surface/save.c +++ b/raster/r.random.surface/save.c @@ -170,7 +170,7 @@ void SaveMap(int NumMap, int MapSeed) for (Col = 0; Col < Cs; Col++) { CellBuffer[Col] = (CELL) Surface[Row][Col]; } - Rast_put_raster_row(OutFD, CellBuffer, CELL_TYPE); + Rast_put_row(OutFD, CellBuffer, CELL_TYPE); } G_percent(1, 1, 1); diff --git a/raster/r.random/random.c b/raster/r.random/random.c index 9d30f286f51..17c63abdd32 100644 --- a/raster/r.random/random.c +++ b/raster/r.random/random.c @@ -216,10 +216,10 @@ int execute_random(struct rr_state *theState) if (theState->outraster) { if (theState->docover == 1) - Rast_put_raster_row(outfd, theState->cover.data.v, + Rast_put_row(outfd, theState->cover.data.v, theState->cover.type); else - Rast_put_raster_row(outfd, theState->buf.data.v, + Rast_put_row(outfd, theState->buf.data.v, theState->buf.type); } } @@ -234,10 +234,10 @@ int execute_random(struct rr_state *theState) } for (; row < nrows; row++) { if (theState->docover == 1) - Rast_put_raster_row(outfd, theState->cover.data.v, + Rast_put_row(outfd, theState->cover.data.v, theState->cover.type); else - Rast_put_raster_row(outfd, theState->buf.data.v, + Rast_put_row(outfd, theState->buf.data.v, theState->buf.type); } } diff --git a/raster/r.recode/recode.c b/raster/r.recode/recode.c index 9d5ea2386ce..61e37e3655f 100644 --- a/raster/r.recode/recode.c +++ b/raster/r.recode/recode.c @@ -85,7 +85,7 @@ static void process_row_ii(int row) Rast_get_c_row(in_fd, (CELL *) in_rast, row); Rast_fpreclass_perform_ii(&rcl_struct, (CELL *) in_rast, (CELL *) out_rast, ncols); - Rast_put_raster_row(out_fd, (CELL *) out_rast, CELL_TYPE); + Rast_put_row(out_fd, (CELL *) out_rast, CELL_TYPE); } static void process_row_if(int row) @@ -96,7 +96,7 @@ static void process_row_if(int row) Rast_get_c_row(in_fd, (CELL *) in_rast, row); Rast_fpreclass_perform_if(&rcl_struct, (CELL *) in_rast, (FCELL *) out_rast, ncols); - Rast_put_f_raster_row(out_fd, (FCELL *) out_rast); + Rast_put_f_row(out_fd, (FCELL *) out_rast); } static void process_row_id(int row) @@ -107,7 +107,7 @@ static void process_row_id(int row) Rast_get_c_row(in_fd, (CELL *) in_rast, row); Rast_fpreclass_perform_id(&rcl_struct, (CELL *) in_rast, (DCELL *) out_rast, ncols); - Rast_put_raster_row(out_fd, (DCELL *) out_rast, DCELL_TYPE); + Rast_put_row(out_fd, (DCELL *) out_rast, DCELL_TYPE); } static void process_row_fi(int row) @@ -118,7 +118,7 @@ static void process_row_fi(int row) Rast_get_f_row(in_fd, (FCELL *) in_rast, row); Rast_fpreclass_perform_fi(&rcl_struct, (FCELL *) in_rast, (CELL *) out_rast, ncols); - Rast_put_raster_row(out_fd, (CELL *) out_rast, CELL_TYPE); + Rast_put_row(out_fd, (CELL *) out_rast, CELL_TYPE); } static void process_row_ff(int row) @@ -129,7 +129,7 @@ static void process_row_ff(int row) Rast_get_f_row(in_fd, (FCELL *) in_rast, row); Rast_fpreclass_perform_ff(&rcl_struct, (FCELL *) in_rast, (FCELL *) out_rast, ncols); - Rast_put_f_raster_row(out_fd, (FCELL *) out_rast); + Rast_put_f_row(out_fd, (FCELL *) out_rast); } static void process_row_fd(int row) @@ -140,7 +140,7 @@ static void process_row_fd(int row) Rast_get_f_row(in_fd, (FCELL *) in_rast, row); Rast_fpreclass_perform_fd(&rcl_struct, (FCELL *) in_rast, (DCELL *) out_rast, ncols); - Rast_put_raster_row(out_fd, (DCELL *) out_rast, DCELL_TYPE); + Rast_put_row(out_fd, (DCELL *) out_rast, DCELL_TYPE); } static void process_row_di(int row) @@ -151,7 +151,7 @@ static void process_row_di(int row) Rast_get_d_row(in_fd, (DCELL *) in_rast, row); Rast_fpreclass_perform_di(&rcl_struct, (DCELL *) in_rast, (CELL *) out_rast, ncols); - Rast_put_raster_row(out_fd, (CELL *) out_rast, CELL_TYPE); + Rast_put_row(out_fd, (CELL *) out_rast, CELL_TYPE); } static void process_row_df(int row) @@ -162,7 +162,7 @@ static void process_row_df(int row) Rast_get_d_row(in_fd, (DCELL *) in_rast, row); Rast_fpreclass_perform_df(&rcl_struct, (DCELL *) in_rast, (FCELL *) out_rast, ncols); - Rast_put_f_raster_row(out_fd, (FCELL *) out_rast); + Rast_put_f_row(out_fd, (FCELL *) out_rast); } static void process_row_dd(int row) @@ -173,5 +173,5 @@ static void process_row_dd(int row) Rast_get_d_row(in_fd, (DCELL *) in_rast, row); Rast_fpreclass_perform_dd(&rcl_struct, (DCELL *) in_rast, (DCELL *) out_rast, ncols); - Rast_put_raster_row(out_fd, (DCELL *) out_rast, DCELL_TYPE); + Rast_put_row(out_fd, (DCELL *) out_rast, DCELL_TYPE); } diff --git a/raster/r.resamp.interp/main.c b/raster/r.resamp.interp/main.c index a2eb3e0cd9f..da536b90953 100644 --- a/raster/r.resamp.interp/main.c +++ b/raster/r.resamp.interp/main.c @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) } Rast_set_window(&dst_w); - Rast_put_d_raster_row(outfile, outbuf); + Rast_put_d_row(outfile, outbuf); } break; @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) } Rast_set_window(&dst_w); - Rast_put_d_raster_row(outfile, outbuf); + Rast_put_d_row(outfile, outbuf); } break; @@ -287,7 +287,7 @@ int main(int argc, char *argv[]) } Rast_set_window(&dst_w); - Rast_put_d_raster_row(outfile, outbuf); + Rast_put_d_row(outfile, outbuf); } break; } diff --git a/raster/r.resamp.stats/main.c b/raster/r.resamp.stats/main.c index 765fac91df8..a40d0d7da51 100644 --- a/raster/r.resamp.stats/main.c +++ b/raster/r.resamp.stats/main.c @@ -149,7 +149,7 @@ static void resamp_unweighted(void) } Rast_set_window(&dst_w); - Rast_put_d_raster_row(outfile, outbuf); + Rast_put_d_row(outfile, outbuf); } } @@ -235,7 +235,7 @@ static void resamp_weighted(void) } Rast_set_window(&dst_w); - Rast_put_d_raster_row(outfile, outbuf); + Rast_put_d_row(outfile, outbuf); } } diff --git a/raster/r.resample/main.c b/raster/r.resample/main.c index 184e13e558b..c3a47636cba 100644 --- a/raster/r.resample/main.c +++ b/raster/r.resample/main.c @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) G_percent(row, nrows, 2); if (Rast_get_row(infd, rast, row, data_type) < 0) G_fatal_error(_("Error reading row %d"), row); - if (Rast_put_raster_row(outfd, rast, out_type) < 0) + if (Rast_put_row(outfd, rast, out_type) < 0) G_fatal_error(_("Error writing row %d"), row); Rast_mark_cats(rast, ncols, &cats, data_type); } diff --git a/raster/r.ros/main.c b/raster/r.ros/main.c index 1d92f1594ca..28cfa5d7a38 100644 --- a/raster/r.ros/main.c +++ b/raster/r.ros/main.c @@ -856,11 +856,11 @@ int main(int argc, char *argv[]) maxdir[col] = (int)Rdir; /*printf("(%d, %d)\nR0=%.2f, vel=%d, dir=%d, phiw=%.2f, s=%d, as=%d, phis=%.2f, R=%.1f, Rdir=%.0f\n", row, col, R0, vel[col], dir[col], phiw, slope[col], aspect[col], phis, R, Rdir); */ } - Rast_put_raster_row(base_fd, base, CELL_TYPE); - Rast_put_raster_row(max_fd, max, CELL_TYPE); - Rast_put_raster_row(maxdir_fd, maxdir, CELL_TYPE); + Rast_put_row(base_fd, base, CELL_TYPE); + Rast_put_row(max_fd, max, CELL_TYPE); + Rast_put_row(maxdir_fd, maxdir, CELL_TYPE); if (spotting) - Rast_put_raster_row(spotdist_fd, spotdist, CELL_TYPE); + Rast_put_row(spotdist_fd, spotdist, CELL_TYPE); } G_percent(row, nrows, 2); diff --git a/raster/r.series/main.c b/raster/r.series/main.c index 09852bc0a49..8f3d8409ee2 100644 --- a/raster/r.series/main.c +++ b/raster/r.series/main.c @@ -270,7 +270,7 @@ int main(int argc, char *argv[]) } for (i = 0; i < num_outputs; i++) - Rast_put_d_raster_row(outputs[i].fd, outputs[i].buf); + Rast_put_d_row(outputs[i].fd, outputs[i].buf); } G_percent(row, nrows, 2); diff --git a/raster/r.slope.aspect/main.c b/raster/r.slope.aspect/main.c index f2d54d41dd9..53a9631e978 100644 --- a/raster/r.slope.aspect/main.c +++ b/raster/r.slope.aspect/main.c @@ -455,7 +455,7 @@ int main(int argc, char *argv[]) slope_fd = opennew(slope_name, out_type); slp_raster = Rast_allocate_buf(data_type); Rast_set_null_value(slp_raster, G_window_cols(), data_type); - Rast_put_raster_row(slope_fd, slp_raster, data_type); + Rast_put_row(slope_fd, slp_raster, data_type); } else { slp_raster = NULL; @@ -466,7 +466,7 @@ int main(int argc, char *argv[]) aspect_fd = opennew(aspect_name, out_type); asp_raster = Rast_allocate_buf(data_type); Rast_set_null_value(asp_raster, G_window_cols(), data_type); - Rast_put_raster_row(aspect_fd, asp_raster, data_type); + Rast_put_row(aspect_fd, asp_raster, data_type); } else { asp_raster = NULL; @@ -477,7 +477,7 @@ int main(int argc, char *argv[]) pcurv_fd = opennew(pcurv_name, out_type); pcurv_raster = Rast_allocate_buf(data_type); Rast_set_null_value(pcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(pcurv_fd, pcurv_raster, data_type); + Rast_put_row(pcurv_fd, pcurv_raster, data_type); } else { pcurv_raster = NULL; @@ -488,7 +488,7 @@ int main(int argc, char *argv[]) tcurv_fd = opennew(tcurv_name, out_type); tcurv_raster = Rast_allocate_buf(data_type); Rast_set_null_value(tcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(tcurv_fd, tcurv_raster, data_type); + Rast_put_row(tcurv_fd, tcurv_raster, data_type); } else { tcurv_raster = NULL; @@ -499,7 +499,7 @@ int main(int argc, char *argv[]) dx_fd = opennew(dx_name, out_type); dx_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dx_fd, dx_raster, data_type); + Rast_put_row(dx_fd, dx_raster, data_type); } else { dx_raster = NULL; @@ -510,7 +510,7 @@ int main(int argc, char *argv[]) dy_fd = opennew(dy_name, out_type); dy_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dy_fd, dy_raster, data_type); + Rast_put_row(dy_fd, dy_raster, data_type); } else { dy_raster = NULL; @@ -521,7 +521,7 @@ int main(int argc, char *argv[]) dxx_fd = opennew(dxx_name, out_type); dxx_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dxx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxx_fd, dxx_raster, data_type); + Rast_put_row(dxx_fd, dxx_raster, data_type); } else { dxx_raster = NULL; @@ -532,7 +532,7 @@ int main(int argc, char *argv[]) dyy_fd = opennew(dyy_name, out_type); dyy_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dyy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dyy_fd, dyy_raster, data_type); + Rast_put_row(dyy_fd, dyy_raster, data_type); } else { dyy_raster = NULL; @@ -543,7 +543,7 @@ int main(int argc, char *argv[]) dxy_fd = opennew(dxy_name, out_type); dxy_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dxy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxy_fd, dxy_raster, data_type); + Rast_put_row(dxy_fd, dxy_raster, data_type); } else { dxy_raster = NULL; @@ -961,31 +961,31 @@ int main(int argc, char *argv[]) } /* column for loop */ if (aspect_fd > 0) - Rast_put_raster_row(aspect_fd, asp_raster, data_type); + Rast_put_row(aspect_fd, asp_raster, data_type); if (slope_fd > 0) - Rast_put_raster_row(slope_fd, slp_raster, data_type); + Rast_put_row(slope_fd, slp_raster, data_type); if (pcurv_fd > 0) - Rast_put_raster_row(pcurv_fd, pcurv_raster, data_type); + Rast_put_row(pcurv_fd, pcurv_raster, data_type); if (tcurv_fd > 0) - Rast_put_raster_row(tcurv_fd, tcurv_raster, data_type); + Rast_put_row(tcurv_fd, tcurv_raster, data_type); if (dx_fd > 0) - Rast_put_raster_row(dx_fd, dx_raster, data_type); + Rast_put_row(dx_fd, dx_raster, data_type); if (dy_fd > 0) - Rast_put_raster_row(dy_fd, dy_raster, data_type); + Rast_put_row(dy_fd, dy_raster, data_type); if (dxx_fd > 0) - Rast_put_raster_row(dxx_fd, dxx_raster, data_type); + Rast_put_row(dxx_fd, dxx_raster, data_type); if (dyy_fd > 0) - Rast_put_raster_row(dyy_fd, dyy_raster, data_type); + Rast_put_row(dyy_fd, dyy_raster, data_type); if (dxy_fd > 0) - Rast_put_raster_row(dxy_fd, dxy_raster, data_type); + Rast_put_row(dxy_fd, dxy_raster, data_type); } /* row loop */ @@ -1002,7 +1002,7 @@ int main(int argc, char *argv[]) struct FPRange range; Rast_set_null_value(asp_raster, G_window_cols(), data_type); - Rast_put_raster_row(aspect_fd, asp_raster, data_type); + Rast_put_row(aspect_fd, asp_raster, data_type); Rast_close(aspect_fd); if (out_type != CELL_TYPE) @@ -1107,7 +1107,7 @@ int main(int argc, char *argv[]) Rast_add_c_color_rule(&val1, 255, 0, 0, &val2, 0, 0, 0, &colors); Rast_set_null_value(slp_raster, G_window_cols(), data_type); - Rast_put_raster_row(slope_fd, slp_raster, data_type); + Rast_put_row(slope_fd, slp_raster, data_type); Rast_close(slope_fd); if (out_type != CELL_TYPE) { @@ -1237,7 +1237,7 @@ int main(int argc, char *argv[]) if (pcurv_fd >= 0) { Rast_set_null_value(pcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(pcurv_fd, pcurv_raster, data_type); + Rast_put_row(pcurv_fd, pcurv_raster, data_type); Rast_close(pcurv_fd); Rast_write_colors(pcurv_name, G_mapset(), &colors); @@ -1264,7 +1264,7 @@ int main(int argc, char *argv[]) if (tcurv_fd >= 0) { Rast_set_null_value(tcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(tcurv_fd, tcurv_raster, data_type); + Rast_put_row(tcurv_fd, tcurv_raster, data_type); Rast_close(tcurv_fd); Rast_write_colors(tcurv_name, G_mapset(), &colors); @@ -1291,7 +1291,7 @@ int main(int argc, char *argv[]) if (dx_fd >= 0) { Rast_set_null_value(dx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dx_fd, dx_raster, data_type); + Rast_put_row(dx_fd, dx_raster, data_type); Rast_close(dx_fd); if (out_type != CELL_TYPE) @@ -1316,7 +1316,7 @@ int main(int argc, char *argv[]) if (dy_fd >= 0) { Rast_set_null_value(dy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dy_fd, dy_raster, data_type); + Rast_put_row(dy_fd, dy_raster, data_type); Rast_close(dy_fd); if (out_type != CELL_TYPE) @@ -1341,7 +1341,7 @@ int main(int argc, char *argv[]) if (dxx_fd >= 0) { Rast_set_null_value(dxx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxx_fd, dxx_raster, data_type); + Rast_put_row(dxx_fd, dxx_raster, data_type); Rast_close(dxx_fd); if (out_type != CELL_TYPE) @@ -1366,7 +1366,7 @@ int main(int argc, char *argv[]) if (dyy_fd >= 0) { Rast_set_null_value(dyy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dyy_fd, dyy_raster, data_type); + Rast_put_row(dyy_fd, dyy_raster, data_type); Rast_close(dyy_fd); if (out_type != CELL_TYPE) @@ -1391,7 +1391,7 @@ int main(int argc, char *argv[]) if (dxy_fd >= 0) { Rast_set_null_value(dxy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxy_fd, dxy_raster, data_type); + Rast_put_row(dxy_fd, dxy_raster, data_type); Rast_close(dxy_fd); if (out_type != CELL_TYPE) diff --git a/raster/r.spread/ram2out.c b/raster/r.spread/ram2out.c index c53bdaa3a6a..cfbd253496d 100644 --- a/raster/r.spread/ram2out.c +++ b/raster/r.spread/ram2out.c @@ -45,11 +45,11 @@ void ram2out(void) window.ns_res * DATA(map_y_out, row, col)); } } - Rast_put_raster_row(cum_fd, cell, CELL_TYPE); + Rast_put_row(cum_fd, cell, CELL_TYPE); if (x_out) - Rast_put_raster_row(x_fd, x_cell, CELL_TYPE); + Rast_put_row(x_fd, x_cell, CELL_TYPE); if (y_out) - Rast_put_raster_row(y_fd, y_cell, CELL_TYPE); + Rast_put_row(y_fd, y_cell, CELL_TYPE); } G_percent(row, nrows, 2); } diff --git a/raster/r.spreadpath/main.c b/raster/r.spreadpath/main.c index f4f5156ce9a..097b8bd7cfd 100644 --- a/raster/r.spreadpath/main.c +++ b/raster/r.spreadpath/main.c @@ -331,7 +331,7 @@ int main(int argc, char **argv) path_fd = Rast_open_c_new(path_layer); for (row = 0; row < nrows; row++) { segment_get_row(&out_seg, cell, row); - if (Rast_put_raster_row(path_fd, cell, CELL_TYPE) < 0) + if (Rast_put_row(path_fd, cell, CELL_TYPE) < 0) G_fatal_error("unable to write map row %d", row); } diff --git a/raster/r.statistics2/main.c b/raster/r.statistics2/main.c index 8345066079f..5c94c96a2d9 100644 --- a/raster/r.statistics2/main.c +++ b/raster/r.statistics2/main.c @@ -512,7 +512,7 @@ int main(int argc, char **argv) else out_buf[col] = result[base_buf[col] - mincat]; - Rast_put_d_raster_row(out_fd, out_buf); + Rast_put_d_row(out_fd, out_buf); G_percent(row, rows, 2); } diff --git a/raster/r.statistics3/main.c b/raster/r.statistics3/main.c index 165e55e49b3..cdaf55f9bd0 100644 --- a/raster/r.statistics3/main.c +++ b/raster/r.statistics3/main.c @@ -352,7 +352,7 @@ static void do_output(int base_fd, char **outputs, const char *covermap) else out_buf[col] = basecats[base_buf[col] - min].quants[quant]; - Rast_put_d_raster_row(out_fd[quant], out_buf); + Rast_put_d_row(out_fd[quant], out_buf); } G_percent(row, rows, 2); diff --git a/raster/r.sun/main.c b/raster/r.sun/main.c index ebb2e67242d..138091876a0 100644 --- a/raster/r.sun/main.c +++ b/raster/r.sun/main.c @@ -750,7 +750,7 @@ int OUTGR(void) else cell7[j] = (FCELL) lumcl[i][j]; } - Rast_put_f_raster_row(fd7, cell7); + Rast_put_f_row(fd7, cell7); } if (beam_rad != NULL) { @@ -761,7 +761,7 @@ int OUTGR(void) cell8[j] = (FCELL) beam[i][j]; } - Rast_put_f_raster_row(fd8, cell8); + Rast_put_f_row(fd8, cell8); } if (insol_time != NULL) { @@ -771,7 +771,7 @@ int OUTGR(void) else cell11[j] = (FCELL) insol[i][j]; } - Rast_put_f_raster_row(fd11, cell11); + Rast_put_f_row(fd11, cell11); } @@ -782,7 +782,7 @@ int OUTGR(void) else cell9[j] = (FCELL) diff[i][j]; } - Rast_put_f_raster_row(fd9, cell9); + Rast_put_f_row(fd9, cell9); } if (refl_rad != NULL) { @@ -792,7 +792,7 @@ int OUTGR(void) else cell10[j] = (FCELL) refl[i][j]; } - Rast_put_f_raster_row(fd10, cell10); + Rast_put_f_row(fd10, cell10); } } diff --git a/raster/r.sun2/main.c b/raster/r.sun2/main.c index 02353bca546..4406c242c97 100644 --- a/raster/r.sun2/main.c +++ b/raster/r.sun2/main.c @@ -1219,7 +1219,7 @@ int OUTGR(void) else cell7[j] = (FCELL) lumcl[i][j]; } - Rast_put_f_raster_row(fd7, cell7); + Rast_put_f_row(fd7, cell7); } if (beam_rad != NULL) { @@ -1229,7 +1229,7 @@ int OUTGR(void) else cell8[j] = (FCELL) beam[i][j]; } - Rast_put_f_raster_row(fd8, cell8); + Rast_put_f_row(fd8, cell8); } if (glob_rad != NULL) { @@ -1239,7 +1239,7 @@ int OUTGR(void) else cell12[j] = (FCELL) globrad[i][j]; } - Rast_put_f_raster_row(fd12, cell12); + Rast_put_f_row(fd12, cell12); } @@ -1250,7 +1250,7 @@ int OUTGR(void) else cell11[j] = (FCELL) insol[i][j]; } - Rast_put_f_raster_row(fd11, cell11); + Rast_put_f_row(fd11, cell11); } @@ -1261,7 +1261,7 @@ int OUTGR(void) else cell9[j] = (FCELL) diff[i][j]; } - Rast_put_f_raster_row(fd9, cell9); + Rast_put_f_row(fd9, cell9); } if (refl_rad != NULL) { @@ -1271,7 +1271,7 @@ int OUTGR(void) else cell10[j] = (FCELL) refl[i][j]; } - Rast_put_f_raster_row(fd10, cell10); + Rast_put_f_row(fd10, cell10); } } diff --git a/raster/r.sunmask/main.c b/raster/r.sunmask/main.c index 2aa5a7bda00..11c5b47a14e 100644 --- a/raster/r.sunmask/main.c +++ b/raster/r.sunmask/main.c @@ -531,7 +531,7 @@ int main(int argc, char *argv[]) col1 += 1; } G_debug(3, "Writing result row %i of %i", row1, window.rows); - Rast_put_raster_row(output_fd, outbuf.c, CELL_TYPE); + Rast_put_row(output_fd, outbuf.c, CELL_TYPE); row1 += 1; } diff --git a/raster/r.surf.contour/main.c b/raster/r.surf.contour/main.c index f345b57a507..e6ad40e627e 100644 --- a/raster/r.surf.contour/main.c +++ b/raster/r.surf.contour/main.c @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) else alt_row[c] = con1; } - Rast_put_raster_row(file_fd, alt_row, CELL_TYPE); + Rast_put_row(file_fd, alt_row, CELL_TYPE); } G_percent(r, nrows, 1); free_cell(con); diff --git a/raster/r.surf.fractal/write_rast.c b/raster/r.surf.fractal/write_rast.c index 1ac5ee94f18..fe47cef6abc 100644 --- a/raster/r.surf.fractal/write_rast.c +++ b/raster/r.surf.fractal/write_rast.c @@ -69,7 +69,7 @@ int write_rast(double *data[2], /* Array holding complex data. */ for (col = 0; col < ncols; col++) *(row_out + col) = (DCELL) (*(data[0] + row * nn + col) * 100000); - Rast_put_raster_row(fd_out, (DCELL *) row_out, DCELL_TYPE); + Rast_put_row(fd_out, (DCELL *) row_out, DCELL_TYPE); } Rast_close(fd_out); diff --git a/raster/r.surf.gauss/gaussurf.c b/raster/r.surf.gauss/gaussurf.c index bc76aa54b2b..d07838e043f 100644 --- a/raster/r.surf.gauss/gaussurf.c +++ b/raster/r.surf.gauss/gaussurf.c @@ -52,7 +52,7 @@ int gaussurf(char *out, /* Name of raster maps to be opened. */ (DCELL) (G_math_rand_gauss(2742, sigma) + mean); /* Write contents row by row */ - Rast_put_d_raster_row(fd_out, (DCELL *) row_out); + Rast_put_d_row(fd_out, (DCELL *) row_out); } diff --git a/raster/r.surf.idw/main.c b/raster/r.surf.idw/main.c index 1a189f08940..c277165b4b9 100644 --- a/raster/r.surf.idw/main.c +++ b/raster/r.surf.idw/main.c @@ -302,7 +302,7 @@ interpolate(MELEMENT rowlist[], SHORT nrows, SHORT ncols, SHORT datarows, } } /* end of loop over columns */ - Rast_put_raster_row(out_fd, cell, CELL_TYPE); + Rast_put_row(out_fd, cell, CELL_TYPE); /* advance current row pointer if necessary */ if (current_row->start->y == row && current_row != lastrow) diff --git a/raster/r.surf.idw2/main.c b/raster/r.surf.idw2/main.c index 794eb3605a5..22fe73964f0 100644 --- a/raster/r.surf.idw2/main.c +++ b/raster/r.surf.idw2/main.c @@ -177,7 +177,7 @@ int main(int argc, char *argv[]) cell[col] = (CELL) (sum1 / sum2 + 0.5); } - Rast_put_raster_row(fd, cell, CELL_TYPE); + Rast_put_row(fd, cell, CELL_TYPE); } G_free(points); diff --git a/raster/r.surf.random/randsurf.c b/raster/r.surf.random/randsurf.c index 33d51e8d28d..f9b0d772604 100644 --- a/raster/r.surf.random/randsurf.c +++ b/raster/r.surf.random/randsurf.c @@ -56,9 +56,9 @@ int randsurf(char *out, /* Name of raster maps to be opened. */ /* Write contents row by row */ if (int_map) - Rast_put_c_raster_row(fd_out, (CELL *) row_out_C); + Rast_put_c_row(fd_out, (CELL *) row_out_C); else - Rast_put_d_raster_row(fd_out, (DCELL *) row_out_D); + Rast_put_d_row(fd_out, (DCELL *) row_out_D); } Rast_close(fd_out); diff --git a/raster/r.terraflow/grass2str.h b/raster/r.terraflow/grass2str.h index c20e69bf126..84c7bf7ddf3 100644 --- a/raster/r.terraflow/grass2str.h +++ b/raster/r.terraflow/grass2str.h @@ -211,7 +211,7 @@ stream2_CELL(AMI_STREAM* str, dimension_type nrows, dimension_type ncols, } } /* for j*/ - if (Rast_put_raster_row (outfd, outrast, mtype) < 0) + if (Rast_put_row (outfd, outrast, mtype) < 0) G_fatal_error ("Cannot write to <%s>",cellname); G_percent(i, nrows, 2); @@ -290,7 +290,7 @@ stream2_CELL(AMI_STREAM *str, dimension_type nrows, dimension_type ncols, } } /* for j*/ - if (Rast_put_raster_row (outfd, outrast, CELL_TYPE) < 0) + if (Rast_put_row (outfd, outrast, CELL_TYPE) < 0) G_fatal_error ("Cannot write to <%s>",cellname); G_percent(i, nrows, 2); @@ -364,7 +364,7 @@ stream2_FCELL(AMI_STREAM *str, dimension_type nrows, dimension_type ncols, } } /* for j*/ - if (Rast_put_raster_row (outfd, outrast, FCELL_TYPE) < 0) + if (Rast_put_row (outfd, outrast, FCELL_TYPE) < 0) G_fatal_error ("Cannot write to <%s>",cellname); G_percent(i, nrows, 2); @@ -473,9 +473,9 @@ stream2_FCELL(AMI_STREAM* str, dimension_type nrows, dimension_type ncols, } /* for j*/ - if (Rast_put_raster_row (fd1, rast1, FCELL_TYPE) < 0) + if (Rast_put_row (fd1, rast1, FCELL_TYPE) < 0) G_fatal_error ("Cannot write to <%s>", cellname1); - if (Rast_put_raster_row (fd2, rast2, FCELL_TYPE) < 0) + if (Rast_put_row (fd2, rast2, FCELL_TYPE) < 0) G_fatal_error ("Cannot write to <%s>", cellname2); G_percent(i, nrows, 2); diff --git a/raster/r.texture/main.c b/raster/r.texture/main.c index 17a7a3b2a7f..c78c70582be 100644 --- a/raster/r.texture/main.c +++ b/raster/r.texture/main.c @@ -332,19 +332,19 @@ int main(int argc, char *argv[]) /* The early (size/2) samples take value from (size/2+1)'th sample */ if (row == 0) for (j = 0; j < (size / 2); j++) - if (Rast_put_raster_row(outfd, outrast, out_data_type) < + if (Rast_put_row(outfd, outrast, out_data_type) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); - if (Rast_put_raster_row(outfd, outrast, out_data_type) < 0) + if (Rast_put_row(outfd, outrast, out_data_type) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); } /* The last few (size/2) samples take value from nrows-(size/2+1)'th sample */ if ((row >= nrows - (size - 1)) && (row < nrows)) for (j = 0; j < (size / 2); j++) - if (Rast_put_raster_row(outfd, outrast, out_data_type) < 0) + if (Rast_put_row(outfd, outrast, out_data_type) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); diff --git a/raster/r.thin/io.c b/raster/r.thin/io.c index 98216470c02..e4ea5ab8805 100644 --- a/raster/r.thin/io.c +++ b/raster/r.thin/io.c @@ -176,7 +176,7 @@ int close_file(char *name) if (buf[col] == 0) Rast_set_null_value(&buf[col], 1, CELL_TYPE); } - Rast_put_raster_row(cell_file, buf + PAD, CELL_TYPE); + Rast_put_row(cell_file, buf + PAD, CELL_TYPE); } Rast_close(cell_file); rowio_flush(&row_io); diff --git a/raster/r.topidx/file_io.c b/raster/r.topidx/file_io.c index f4ed0725331..c0a1b8f4920 100644 --- a/raster/r.topidx/file_io.c +++ b/raster/r.topidx/file_io.c @@ -89,7 +89,7 @@ void putcells(void) for (i = 0; i < window.rows; i++) { G_percent(i, window.rows, 2); - Rast_put_d_raster_row(fd, atb[i]); + Rast_put_d_row(fd, atb[i]); } G_percent(i, window.rows, 2); Rast_close(fd); diff --git a/raster/r.uslek/main.c b/raster/r.uslek/main.c index 047034dcfa6..438b2e7515f 100644 --- a/raster/r.uslek/main.c +++ b/raster/r.uslek/main.c @@ -164,7 +164,7 @@ int main(int argc, char *argv[]) } } } - if (Rast_put_d_raster_row(outfd, outrast) < 0) + if (Rast_put_d_row(outfd, outrast) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); } diff --git a/raster/r.usler/main.c b/raster/r.usler/main.c index db2693f6707..319cae3538d 100644 --- a/raster/r.usler/main.c +++ b/raster/r.usler/main.c @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) outrast[col] = d ; } } - if (Rast_put_d_raster_row(outfd, outrast) < 0) + if (Rast_put_d_row(outfd, outrast) < 0) G_fatal_error(_("Failed writing raster map <%s> row %d"), result, row); } diff --git a/raster/r.walk/main.c b/raster/r.walk/main.c index f56e732fa73..d4967691a0d 100644 --- a/raster/r.walk/main.c +++ b/raster/r.walk/main.c @@ -1500,7 +1500,7 @@ int main(int argc, char *argv[]) *(p + col) = (int)(min_cost + .5); } } - Rast_put_raster_row(cum_fd, cum_cell, cum_data_type); + Rast_put_row(cum_fd, cum_cell, cum_data_type); } } else if (cum_data_type == FCELL_TYPE) { @@ -1535,7 +1535,7 @@ int main(int argc, char *argv[]) *(p + col) = (float)(min_cost); } } - Rast_put_raster_row(cum_fd, cum_cell, cum_data_type); + Rast_put_row(cum_fd, cum_cell, cum_data_type); } } else if (cum_data_type == DCELL_TYPE) { @@ -1570,7 +1570,7 @@ int main(int argc, char *argv[]) *(p + col) = min_cost; } } - Rast_put_raster_row(cum_fd, cum_cell, cum_data_type); + Rast_put_row(cum_fd, cum_cell, cum_data_type); } } @@ -1584,7 +1584,7 @@ int main(int argc, char *argv[]) segment_get(&out_seg2, &cur_dir, row, col); *(p + col) = cur_dir; } - Rast_put_raster_row(dir_fd, dir_cell, dir_data_type); + Rast_put_row(dir_fd, dir_cell, dir_data_type); } G_percent(row, nrows, 2); } diff --git a/raster/r.water.outlet/main.c b/raster/r.water.outlet/main.c index 90b8e0db968..6659cf161dc 100644 --- a/raster/r.water.outlet/main.c +++ b/raster/r.water.outlet/main.c @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) for (col = 0; col < ncols; col++) { cell_buf[col] = bas[SEG_INDEX(ba_seg, row, col)]; } - Rast_put_raster_row(basin_fd, cell_buf, CELL_TYPE); + Rast_put_row(basin_fd, cell_buf, CELL_TYPE); } G_free(bas); G_free(cell_buf); diff --git a/raster/r.watershed/ram/close_maps.c b/raster/r.watershed/ram/close_maps.c index fedd0eb7e99..573a2853057 100644 --- a/raster/r.watershed/ram/close_maps.c +++ b/raster/r.watershed/ram/close_maps.c @@ -45,7 +45,7 @@ int close_maps(void) sum_sqr += dvalue * dvalue; } } - Rast_put_raster_row(fd, dbuf, DCELL_TYPE); + Rast_put_row(fd, dbuf, DCELL_TYPE); } } else { @@ -60,7 +60,7 @@ int close_maps(void) sum_sqr += dvalue * dvalue; } } - Rast_put_raster_row(fd, dbuf, DCELL_TYPE); + Rast_put_row(fd, dbuf, DCELL_TYPE); } } if (Rast_close(fd) < 0) @@ -148,7 +148,7 @@ int close_maps(void) for (c = 0; c < ncols; c++) { buf[c] = asp[SEG_INDEX(asp_seg, r, c)]; } - Rast_put_raster_row(fd, buf, CELL_TYPE); + Rast_put_row(fd, buf, CELL_TYPE); } if (Rast_close(fd) < 0) G_warning(_("Close failed.")); @@ -181,7 +181,7 @@ int close_maps(void) } } } - Rast_put_raster_row(fd, buf, CELL_TYPE); + Rast_put_row(fd, buf, CELL_TYPE); } if (Rast_close(fd) < 0) G_warning(_("Close failed.")); @@ -206,7 +206,7 @@ int close_maps(void) for (c = 0; c < ncols; c++) { dbuf[c] = l_s[SEG_INDEX(l_s_seg, r, c)]; } - Rast_put_raster_row(fd, dbuf, DCELL_TYPE); + Rast_put_row(fd, dbuf, DCELL_TYPE); } if (Rast_close(fd) < 0) G_warning(_("Close failed.")); @@ -226,7 +226,7 @@ int close_maps(void) if (dbuf[c] > max_length) dbuf[c] = max_length; } - Rast_put_raster_row(fd, dbuf, DCELL_TYPE); + Rast_put_row(fd, dbuf, DCELL_TYPE); } if (Rast_close(fd) < 0) G_warning(_("Close failed.")); @@ -246,7 +246,7 @@ int close_maps(void) for (c = 0; c < ncols; c++) { dbuf[c] = s_g[SEG_INDEX(s_g_seg, r, c)]; } - Rast_put_raster_row(fd, dbuf, DCELL_TYPE); + Rast_put_row(fd, dbuf, DCELL_TYPE); } if (Rast_close(fd) < 0) G_warning(_("Close failed.")); diff --git a/raster/r.watershed/ram/close_maps2.c b/raster/r.watershed/ram/close_maps2.c index f1fb0810cb7..85f2c1cb6b8 100644 --- a/raster/r.watershed/ram/close_maps2.c +++ b/raster/r.watershed/ram/close_maps2.c @@ -91,7 +91,7 @@ int close_array_seg(void) if (value) cellrow[c] = bas[SEG_INDEX(bas_seg, r, c)]; } - Rast_put_raster_row(map_fd, cellrow, CELL_TYPE); + Rast_put_row(map_fd, cellrow, CELL_TYPE); } Rast_close(map_fd); Rast_write_colors(seg_name, this_mapset, &colors); @@ -106,7 +106,7 @@ int close_array_seg(void) if (cellrow[c] == 0) Rast_set_c_null_value(cellrow + c, 1); } - Rast_put_raster_row(map_fd, cellrow, CELL_TYPE); + Rast_put_row(map_fd, cellrow, CELL_TYPE); } Rast_close(map_fd); Rast_write_colors(bas_name, this_mapset, &colors); @@ -121,7 +121,7 @@ int close_array_seg(void) if (cellrow[c] == 0) Rast_set_c_null_value(cellrow + c, 1); } - Rast_put_raster_row(map_fd, cellrow, CELL_TYPE); + Rast_put_row(map_fd, cellrow, CELL_TYPE); } Rast_close(map_fd); Rast_write_colors(haf_name, this_mapset, &colors); diff --git a/raster/r.watershed/seg/bseg_write.c b/raster/r.watershed/seg/bseg_write.c index 7677dbfedca..2784568cf32 100644 --- a/raster/r.watershed/seg/bseg_write.c +++ b/raster/r.watershed/seg/bseg_write.c @@ -25,7 +25,7 @@ int bseg_write_cellfile(BSEG * bseg, char *map_name) bseg_get(bseg, &value, row, col); buffer[col] = value; } - if (Rast_put_raster_row(map_fd, buffer, CELL_TYPE) < 0) { + if (Rast_put_row(map_fd, buffer, CELL_TYPE) < 0) { G_free(buffer); Rast_unopen(map_fd); G_warning("%s(): unable to write new map layer [%s], row %d", diff --git a/raster/r.watershed/seg/close_maps.c b/raster/r.watershed/seg/close_maps.c index 9824e1d0363..d54de391ff0 100644 --- a/raster/r.watershed/seg/close_maps.c +++ b/raster/r.watershed/seg/close_maps.c @@ -38,7 +38,7 @@ int close_maps(void) sum_sqr += dvalue * dvalue; } } - Rast_put_raster_row(fd, dbuf, DCELL_TYPE); + Rast_put_row(fd, dbuf, DCELL_TYPE); } if (Rast_close(fd) < 0) G_warning(_("Close failed.")); diff --git a/raster/r.watershed/seg/close_maps2.c b/raster/r.watershed/seg/close_maps2.c index c62a25f71d0..35053534e80 100644 --- a/raster/r.watershed/seg/close_maps2.c +++ b/raster/r.watershed/seg/close_maps2.c @@ -81,7 +81,7 @@ int close_array_seg(void) if (value) cseg_get(&bas, &(cellrow[c]), r, c); } - Rast_put_raster_row(map_fd, cellrow, CELL_TYPE); + Rast_put_row(map_fd, cellrow, CELL_TYPE); } G_free(cellrow); Rast_close(map_fd); diff --git a/raster/r.watershed/seg/cseg_write.c b/raster/r.watershed/seg/cseg_write.c index 61624eca316..598127eaf98 100644 --- a/raster/r.watershed/seg/cseg_write.c +++ b/raster/r.watershed/seg/cseg_write.c @@ -21,7 +21,7 @@ int cseg_write_cellfile(CSEG * cseg, char *map_name) segment_flush(&(cseg->seg)); for (row = 0; row < nrows; row++) { segment_get_row(&(cseg->seg), buffer, row); - if (Rast_put_raster_row(map_fd, buffer, CELL_TYPE) < 0) { + if (Rast_put_row(map_fd, buffer, CELL_TYPE) < 0) { G_free(buffer); Rast_unopen(map_fd); G_warning("%s(): unable to write new map layer [%s], row %d", diff --git a/raster/r.watershed/seg/dseg_write.c b/raster/r.watershed/seg/dseg_write.c index 8a9792564bd..90a32af5b59 100644 --- a/raster/r.watershed/seg/dseg_write.c +++ b/raster/r.watershed/seg/dseg_write.c @@ -22,7 +22,7 @@ int dseg_write_cellfile(DSEG * dseg, char *map_name) segment_flush(&(dseg->seg)); for (row = 0; row < nrows; row++) { segment_get_row(&(dseg->seg), (DCELL *) dbuffer, row); - if (Rast_put_raster_row(map_fd, dbuffer, DCELL_TYPE) < 0) { + if (Rast_put_row(map_fd, dbuffer, DCELL_TYPE) < 0) { G_free(dbuffer); Rast_unopen(map_fd); G_warning("%s(): unable to write new map layer [%s], row %d", diff --git a/raster/simwe/simlib/output.c b/raster/simwe/simlib/output.c index bf3ea037450..6eca1f197a3 100644 --- a/raster/simwe/simlib/output.c +++ b/raster/simwe/simlib/output.c @@ -194,7 +194,7 @@ int output_data(int tt, double ft) gmax = amax1(gmax, a1); } } - Rast_put_f_raster_row(fd6, cell6); + Rast_put_f_row(fd6, cell6); } if (disch != NULL) { @@ -208,7 +208,7 @@ int output_data(int tt, double ft) dismax = amax1(dismax, a2); } } - Rast_put_f_raster_row(fd7, cell7); + Rast_put_f_row(fd7, cell7); } if (err != NULL) { @@ -220,7 +220,7 @@ int output_data(int tt, double ft) gsmax = amax1(gsmax, gammas[i][j]); /* add conv? */ } } - Rast_put_f_raster_row(fd8, cell8); + Rast_put_f_row(fd8, cell8); } @@ -233,7 +233,7 @@ int output_data(int tt, double ft) /* gsmax = amax1(gsmax, gama[i][j]); */ } } - Rast_put_f_raster_row(fd14, cell14); + Rast_put_f_row(fd14, cell14); } @@ -248,7 +248,7 @@ int output_data(int tt, double ft) dismax = amax1(dismax, a2); } } - Rast_put_f_raster_row(fd15, cell15); + Rast_put_f_row(fd15, cell15); } @@ -262,7 +262,7 @@ int output_data(int tt, double ft) ermin = amin1(ermin, er[i][j]); } } - Rast_put_f_raster_row(fd16, cell16); + Rast_put_f_row(fd16, cell16); } } @@ -669,7 +669,7 @@ int output_et() etmin = amin1(etmin, er[i][j]); } } - Rast_put_f_raster_row(fd17, cell17); + Rast_put_f_row(fd17, cell17); } if (tc != NULL) { @@ -686,7 +686,7 @@ int output_et() /* gsmax = amax1(gsmax, trc); */ } } - Rast_put_f_raster_row(fd13, cell13); + Rast_put_f_row(fd13, cell13); } } diff --git a/raster3d/r3.cross.rast/main.c b/raster3d/r3.cross.rast/main.c index 39d8c594408..2b321b86e1b 100644 --- a/raster3d/r3.cross.rast/main.c +++ b/raster3d/r3.cross.rast/main.c @@ -225,14 +225,14 @@ void rast3d_cross_section(void *map, G3D_Region region, int elevfd, int outfd) /*Write the data to the output map */ if (typeIntern == FCELL_TYPE) { - check = Rast_put_f_raster_row(outfd, fcell); + check = Rast_put_f_row(outfd, fcell); if (check != 1) fatal_error(map, elevfd, outfd, _("Could not write raster row")); } if (typeIntern == DCELL_TYPE) { - check = Rast_put_d_raster_row(outfd, dcell); + check = Rast_put_d_row(outfd, dcell); if (check != 1) fatal_error(map, elevfd, outfd, _("Could not write raster row")); diff --git a/raster3d/r3.to.rast/main.c b/raster3d/r3.to.rast/main.c index aa110bd57e2..b961c4093c2 100644 --- a/raster3d/r3.to.rast/main.c +++ b/raster3d/r3.to.rast/main.c @@ -147,14 +147,14 @@ void g3d_to_raster(void *map, G3D_Region region, int *fd) } } if (typeIntern == FCELL_TYPE) { - check = Rast_put_f_raster_row(fd[pos], fcell); + check = Rast_put_f_row(fd[pos], fcell); if (check != 1) fatal_error(map, fd, depths, _("Unable to write raster row")); } if (typeIntern == DCELL_TYPE) { - check = Rast_put_d_raster_row(fd[pos], dcell); + check = Rast_put_d_row(fd[pos], dcell); if (check != 1) fatal_error(map, fd, depths, _("Unable to write raster row")); diff --git a/swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.c b/swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.c index 6215575f792..fa4f28d5cfe 100644 --- a/swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.c +++ b/swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.c @@ -482,7 +482,7 @@ int r_slope_aspect(int argc, char *argv[]) slope_fd = opennew(slope_name, out_type); slp_raster = Rast_allocate_buf(data_type); Rast_set_null_value(slp_raster, G_window_cols(), data_type); - Rast_put_raster_row(slope_fd, slp_raster, data_type); + Rast_put_row(slope_fd, slp_raster, data_type); } else { slp_raster = NULL; @@ -493,7 +493,7 @@ int r_slope_aspect(int argc, char *argv[]) aspect_fd = opennew(aspect_name, out_type); asp_raster = Rast_allocate_buf(data_type); Rast_set_null_value(asp_raster, G_window_cols(), data_type); - Rast_put_raster_row(aspect_fd, asp_raster, data_type); + Rast_put_row(aspect_fd, asp_raster, data_type); } else { asp_raster = NULL; @@ -504,7 +504,7 @@ int r_slope_aspect(int argc, char *argv[]) pcurv_fd = opennew(pcurv_name, out_type); pcurv_raster = Rast_allocate_buf(data_type); Rast_set_null_value(pcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(pcurv_fd, pcurv_raster, data_type); + Rast_put_row(pcurv_fd, pcurv_raster, data_type); } else { pcurv_raster = NULL; @@ -515,7 +515,7 @@ int r_slope_aspect(int argc, char *argv[]) tcurv_fd = opennew(tcurv_name, out_type); tcurv_raster = Rast_allocate_buf(data_type); Rast_set_null_value(tcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(tcurv_fd, tcurv_raster, data_type); + Rast_put_row(tcurv_fd, tcurv_raster, data_type); } else { tcurv_raster = NULL; @@ -526,7 +526,7 @@ int r_slope_aspect(int argc, char *argv[]) dx_fd = opennew(dx_name, out_type); dx_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dx_fd, dx_raster, data_type); + Rast_put_row(dx_fd, dx_raster, data_type); } else { dx_raster = NULL; @@ -537,7 +537,7 @@ int r_slope_aspect(int argc, char *argv[]) dy_fd = opennew(dy_name, out_type); dy_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dy_fd, dy_raster, data_type); + Rast_put_row(dy_fd, dy_raster, data_type); } else { dy_raster = NULL; @@ -548,7 +548,7 @@ int r_slope_aspect(int argc, char *argv[]) dxx_fd = opennew(dxx_name, out_type); dxx_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dxx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxx_fd, dxx_raster, data_type); + Rast_put_row(dxx_fd, dxx_raster, data_type); } else { dxx_raster = NULL; @@ -559,7 +559,7 @@ int r_slope_aspect(int argc, char *argv[]) dyy_fd = opennew(dyy_name, out_type); dyy_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dyy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dyy_fd, dyy_raster, data_type); + Rast_put_row(dyy_fd, dyy_raster, data_type); } else { dyy_raster = NULL; @@ -570,7 +570,7 @@ int r_slope_aspect(int argc, char *argv[]) dxy_fd = opennew(dxy_name, out_type); dxy_raster = Rast_allocate_buf(data_type); Rast_set_null_value(dxy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxy_fd, dxy_raster, data_type); + Rast_put_row(dxy_fd, dxy_raster, data_type); } else { dxy_raster = NULL; @@ -987,31 +987,31 @@ int r_slope_aspect(int argc, char *argv[]) } /* column for loop */ if (aspect_fd > 0) - Rast_put_raster_row(aspect_fd, asp_raster, data_type); + Rast_put_row(aspect_fd, asp_raster, data_type); if (slope_fd > 0) - Rast_put_raster_row(slope_fd, slp_raster, data_type); + Rast_put_row(slope_fd, slp_raster, data_type); if (pcurv_fd > 0) - Rast_put_raster_row(pcurv_fd, pcurv_raster, data_type); + Rast_put_row(pcurv_fd, pcurv_raster, data_type); if (tcurv_fd > 0) - Rast_put_raster_row(tcurv_fd, tcurv_raster, data_type); + Rast_put_row(tcurv_fd, tcurv_raster, data_type); if (dx_fd > 0) - Rast_put_raster_row(dx_fd, dx_raster, data_type); + Rast_put_row(dx_fd, dx_raster, data_type); if (dy_fd > 0) - Rast_put_raster_row(dy_fd, dy_raster, data_type); + Rast_put_row(dy_fd, dy_raster, data_type); if (dxx_fd > 0) - Rast_put_raster_row(dxx_fd, dxx_raster, data_type); + Rast_put_row(dxx_fd, dxx_raster, data_type); if (dyy_fd > 0) - Rast_put_raster_row(dyy_fd, dyy_raster, data_type); + Rast_put_row(dyy_fd, dyy_raster, data_type); if (dxy_fd > 0) - Rast_put_raster_row(dxy_fd, dxy_raster, data_type); + Rast_put_row(dxy_fd, dxy_raster, data_type); } /* row loop */ @@ -1028,7 +1028,7 @@ int r_slope_aspect(int argc, char *argv[]) struct FPRange range; Rast_set_null_value(asp_raster, G_window_cols(), data_type); - Rast_put_raster_row(aspect_fd, asp_raster, data_type); + Rast_put_row(aspect_fd, asp_raster, data_type); Rast_close(aspect_fd); if (out_type != CELL_TYPE) @@ -1131,7 +1131,7 @@ int r_slope_aspect(int argc, char *argv[]) Rast_add_c_color_rule(&val1, 255, 0, 0, &val2, 0, 0, 0, &colors); Rast_set_null_value(slp_raster, G_window_cols(), data_type); - Rast_put_raster_row(slope_fd, slp_raster, data_type); + Rast_put_row(slope_fd, slp_raster, data_type); Rast_close(slope_fd); if (out_type != CELL_TYPE) { @@ -1259,7 +1259,7 @@ int r_slope_aspect(int argc, char *argv[]) if (pcurv_fd >= 0) { Rast_set_null_value(pcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(pcurv_fd, pcurv_raster, data_type); + Rast_put_row(pcurv_fd, pcurv_raster, data_type); Rast_close(pcurv_fd); Rast_write_colors(pcurv_name, G_mapset(), &colors); @@ -1285,7 +1285,7 @@ int r_slope_aspect(int argc, char *argv[]) if (tcurv_fd >= 0) { Rast_set_null_value(tcurv_raster, G_window_cols(), data_type); - Rast_put_raster_row(tcurv_fd, tcurv_raster, data_type); + Rast_put_row(tcurv_fd, tcurv_raster, data_type); Rast_close(tcurv_fd); Rast_write_colors(tcurv_name, G_mapset(), &colors); @@ -1311,7 +1311,7 @@ int r_slope_aspect(int argc, char *argv[]) if (dx_fd >= 0) { Rast_set_null_value(dx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dx_fd, dx_raster, data_type); + Rast_put_row(dx_fd, dx_raster, data_type); Rast_close(dx_fd); if (out_type != CELL_TYPE) @@ -1335,7 +1335,7 @@ int r_slope_aspect(int argc, char *argv[]) if (dy_fd >= 0) { Rast_set_null_value(dy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dy_fd, dy_raster, data_type); + Rast_put_row(dy_fd, dy_raster, data_type); Rast_close(dy_fd); if (out_type != CELL_TYPE) @@ -1359,7 +1359,7 @@ int r_slope_aspect(int argc, char *argv[]) if (dxx_fd >= 0) { Rast_set_null_value(dxx_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxx_fd, dxx_raster, data_type); + Rast_put_row(dxx_fd, dxx_raster, data_type); Rast_close(dxx_fd); if (out_type != CELL_TYPE) @@ -1383,7 +1383,7 @@ int r_slope_aspect(int argc, char *argv[]) if (dyy_fd >= 0) { Rast_set_null_value(dyy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dyy_fd, dyy_raster, data_type); + Rast_put_row(dyy_fd, dyy_raster, data_type); Rast_close(dyy_fd); if (out_type != CELL_TYPE) @@ -1407,7 +1407,7 @@ int r_slope_aspect(int argc, char *argv[]) if (dxy_fd >= 0) { Rast_set_null_value(dxy_raster, G_window_cols(), data_type); - Rast_put_raster_row(dxy_fd, dxy_raster, data_type); + Rast_put_row(dxy_fd, dxy_raster, data_type); Rast_close(dxy_fd); if (out_type != CELL_TYPE) diff --git a/vector/lidar/lidarlib/zones.c b/vector/lidar/lidarlib/zones.c index 06af585ac37..70fb40ec18d 100644 --- a/vector/lidar/lidarlib/zones.c +++ b/vector/lidar/lidarlib/zones.c @@ -285,7 +285,7 @@ void P_Aux_to_Raster(double **matrix, int fd) col++, ptr = G_incr_void_ptr(ptr, Rast_cell_size(DCELL_TYPE))) { Rast_set_raster_value_d(ptr, (DCELL) (matrix[row][col]), DCELL_TYPE); } - Rast_put_d_raster_row(fd, raster); + Rast_put_d_row(fd, raster); } } diff --git a/vector/v.kernel/main.c b/vector/v.kernel/main.c index cd5cf31205d..47ac65f0d04 100644 --- a/vector/v.kernel/main.c +++ b/vector/v.kernel/main.c @@ -417,7 +417,7 @@ int main(int argc, char **argv) if (gaussian > gausmax) gausmax = gaussian; } - Rast_put_raster_row(fdout, output_cell, DCELL_TYPE); + Rast_put_row(fdout, output_cell, DCELL_TYPE); } Rast_close(fdout); diff --git a/vector/v.neighbors/main.c b/vector/v.neighbors/main.c index d8a2a30d966..96a9cb51027 100644 --- a/vector/v.neighbors/main.c +++ b/vector/v.neighbors/main.c @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) rp = G_incr_void_ptr(rp, Rast_cell_size(CELL_TYPE)); } - Rast_put_raster_row(out_fd, result, CELL_TYPE); + Rast_put_row(out_fd, result, CELL_TYPE); } G_percent(row, nrows, 1); diff --git a/vector/v.surf.idw/main.c b/vector/v.surf.idw/main.c index c1399c4982a..1a363e7a130 100644 --- a/vector/v.surf.idw/main.c +++ b/vector/v.surf.idw/main.c @@ -395,7 +395,7 @@ int main(int argc, char *argv[]) } dcell[col] = (DCELL) interp_value; } - Rast_put_d_raster_row(fd, dcell); + Rast_put_d_row(fd, dcell); } Rast_close(fd); /* writing history file */ diff --git a/vector/v.to.rast/raster.c b/vector/v.to.rast/raster.c index 091aa5d56c5..761f432b744 100644 --- a/vector/v.to.rast/raster.c +++ b/vector/v.to.rast/raster.c @@ -145,7 +145,7 @@ int output_raster(int fd) /* insert the NULL values */ Rast_insert_c_null_values(cell, null_flags[i], page.cols); - if (Rast_put_c_raster_row(fd, cell) < 0) + if (Rast_put_c_row(fd, cell) < 0) return -1; break; case USE_DCELL: @@ -153,7 +153,7 @@ int output_raster(int fd) /* insert the NULL values */ Rast_insert_d_null_values(dcell, null_flags[i], page.cols); - if (Rast_put_d_raster_row(fd, dcell) < 0) + if (Rast_put_d_row(fd, dcell) < 0) return -1; break; } diff --git a/vector/v.vol.rst/user1.c b/vector/v.vol.rst/user1.c index 6d73c2bc9e5..15f036f84e8 100644 --- a/vector/v.vol.rst/user1.c +++ b/vector/v.vol.rst/user1.c @@ -408,7 +408,7 @@ int OUTGR() 0) == -1) G_fatal_error("cannot fseek to the right spot"); fread(cell, sizeof(FCELL), nsizc, Tmp_fd_cell); - Rast_put_f_raster_row(fdcout, cell); + Rast_put_f_row(fdcout, cell); } }