As far as I can tell I have set the dir_fd file up to be full of double values:

        dir_buf = G_allocate_d_raster_buf();
        dir_id = G_open_cell_old(dir_name, dir_mapset);
            tempfile3 = G_tempfile();
                dir_fd = open(tempfile3, O_RDWR | O_CREAT);

            //cn: transfer dir input map to a temp file
            for (i = 0; i < nrows; i++) {
                G_get_d_raster_row(dir_id, dir_buf, i);
                //get_row(dir_id, dir_buf, i);
                write(dir_fd, dir_buf, sizeof(DCELL));
            }
        G_close_cell(dir_id);
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to