[GRASS5] [bug #3124] (grass) impossible to remove imported
vector file
Hamish
hamish_nospam at yahoo.com
Wed Mar 30 01:36:25 EST 2005
> > What is written in head file?
>
> thanks for the hint - the problem files have an extra empty line in
> the header - like this
>
> ORGANIZATION: GRASS Development Team
>
> DIGIT DATE: Tue Mar 26 13:37:29
> DIGIT NAME: jaro
> MAP NAME: NCS-GRD2.dxf
> MAP DATE:
> MAP SCALE: 2400
> OTHER INFO:
> ZONE: 0
> MAP THRESH: 0.000000
>
>
> when I remove that empty line, it works OK (d.vect displays it and
> g.remove deletes it)
>
> I tried to find out why it is putting that line in and it looks like
> this file might have been imported under MS Windows (Jaro do you
> remember? all the files that do not work have x permissions)
> -rw-r--r-- 1 helena helena 2163 Jan 10 22:46 wetland
> -rwxr-xr-x 1 helena helena 1851 Mar 29 11:46 wetlandcheckd
'file wetlandcheckd' will let you know the format.
try dos2unix on it?
> let me know if I should explore this further - apparently it is the
> data that is the problem, but we should find a better way how to
> handle such data as other users may have something like this too,
there is, use G_getl2() and not fgets() in whatever function is reading
the header. This deals with UNIX/DOS/MacOS9 text files nicely.
(Radim just added)
'v.in.ascii format=standard' still needs to be updated; harder to say if
lib fn's should be updated to deal with "corrupt" map files too?
Hamish
More information about the grass-dev
mailing list