[GRASS5] v.in.ascii updates

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Sun Mar 20 14:05:26 EST 2005


From: Hamish <hamish_nospam at yahoo.com>
Sent: Sun, 20 Mar 2005 22:30:46 +1200
> > >  ? skip blank lines in input file.
> > >    (currently extra newlines at EOF break import of points)
> > 
> > User must be warn if there are errors in the file, empty line may be 
> > error in input. There should be probably a flag for shuch skipping.
> 
> not done. I'd like to ignore blank lines if they happen at end of 
> file, but don't see an easy way of doing that. I agree that blank 
> lines mid- file is an error.

In points.c, points_to_bin function, I guess.

If we are setting on:

a) blank line(s) followed by eof -> ok and 
b) blank line(s) followed by non-eof -> error, 

you might catch the first blank line then consume ascii_in until not blank or
eof; then the previous rule applies.

Just an idea...

Daniel.




More information about the grass-dev mailing list