[GRASS-user] i.rectify - ERROR: error while writing to temp file

Hamish hamish_b at yahoo.com
Thu Jun 12 01:58:10 EDT 2008


Alfredo:
> I'm trying to rectify some scanned maps, but I've
> this error:
> 
> ERROR: error while writing to tmp file
> 
> I've checked the write permission of .tmp directory and
> it's ok...
> 
> I've 15 GB of free space.
> 
> How can I solve this problem?
> 
> The .tmp directory where the .tmp files are saved, are the
> source LOCATION (xy) or target LOCATION?


No idea, but the help page says this:
---
If i.rectify starts normally but after some time the following text is seen:
GIS ERROR: error while writing to temp file
the user may try the flag -c (or the module needs more free space on the hard drive).
---

The -c flag: "Use curr. region settings in target location (def.=calculate smallest area)"



the code that triggers that is this, in i.rectify/write.c:
---
offset = ((off_t) row++ * target_window.cols + col) *
          G_raster_size(map_type);
lseek(temp_fd,offset,SEEK_SET);

if(write(temp_fd,cell_buf[n],G_raster_size(map_type)*matrix_cols) 
                          != G_raster_size(map_type)*matrix_cols)
{
    unlink(temp_name);
    G_fatal_error("error while writing to temp file");
}
---

?does the (off_t) cast only affect nearest row++ and not the whole (row*col+col)? or does the whole thing get promoted once one part of the calc is cast to off_t? or is that ok?


how does the region in your target mapset look like? of your source image?


Hamish



      



More information about the grass-user mailing list