[GRASS-user] Re: grassuser Digest, Vol 11, Issue 18
Hamish
hamish_nospam at yahoo.com
Sun Mar 18 20:58:49 EDT 2007
> > Maciej Sieczka wrote:
> >> I don't think you can import vector in standard format together
> >> with it's attributes using v.in.ascii. It's possible only for
> >> points format. In standard format, the "1982 2.88" etc. after x,y
> >> coordinates are discarded.
Hamish wrote:
> > the form is one coordinate per line. Z value is optional.
> > " X Y [Z]"
Maciej wrote:
> My bad. Thanks for pointing this out. But the 4th attribute is
> omitted, is that correct?
Here is a snipped version of the code in question:
vector/v.in.ascii/a2b.c
for( i=0; i<n_coors; i++) {
G_getl2()
...
if ( sscanf(buff, "%lf%lf%lf", x, y, z) < 2 ) {
G_warning("Error reading ascii file")
return 0;
}
...
}
only the first three numbers on a line are scanned. The rest of the line
(if any) is undefined in meaning and, as currently coded, will be ignored.
Hamish
More information about the grass-user
mailing list