[GRASSLIST:6852] Re: Data corruption after v.digit crash

Radim Blazek blazek at itc.it
Mon May 23 04:00:44 EDT 2005


Andrew Birkett wrote:
> Hi,
> 
> I'm using grass-6.0.0 to create a vector version of some scanned
> out-of-copyright maps.  At one point, v.digit froze and after a while I
> had to kill the process.  Upon restarting, I can display my vector map
> using d.vect but I get a warning "coor files of vector 'foo at PERMANENT'
> is larger than it should be'.  From reading around, this is to be
> expected since v.digit writes out the length data on exit.  

It would be possible but probably too slow (I think) to rewrite the size 
always when a new line is written (hard disk head jumps?).

If anybody is interested, it is possible to try to add

Vect_coor_info ( Map, &CInfo );
Map->plus.coor_size = CInfo.size;
dig__write_head (Map);

into

V1_rewrite_line_nat()


> The recommend fix is to rerun v.digit to rewrite the file.
> 
> However, if I try to run v.digit I get the following error;
> 
>  "ERROR: Cannot open old vector foo at PERMANENT on level 2"
> 
> I get the same error if I try to export the dataset using v.out.ogr.

You have to run v.build, it is always necessay after crash.

> Now, my vector dataset was created today in grass 6.0 so I don't imagine
> it uses the old vector format.  Certainly, "g.list type=vect" shows my
> map and "g.list type=oldvect" doesn't.
> 
> Any idea how I can recover my data?  I was only doing a small amount of
> work today to test-drive grass6, but since v.digit crashed once it's
> reasonable to assume I'll encounter this again when I do the map for
> real.
> 
> Secondly does grass6 allow you to store the geometry of a vector map in
> a postgis table?  (I've been storing attributes on a pg table).  I'd
> feel a bit happier if my data was being updated with transactions to
> avoid crash-lossage like this.

No.

Radim

> Thanks in advance for any help.  Today is the first day I feel that I've
> got into the "grass way" of thinking about things.  
> 
> Andrew
> 




More information about the grass-user mailing list