Subject: impossible to remove imported vector file
Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
I am using GRASS CVS downloaded and compiled March 22.
In a transition from GRASS5.3 to GRASS6 I have converted quite a few files from old to new vector format using v.convert. Some work without any problems, but for some files, I cannot display them, but what is even worse, I cannot remove them. It would be great to get at least the possibility to remove the file before the next release. If I am just missing something, please let me know,
Helena
g.remove vect=wetlandcheckd1
REMOVE [wetlandcheckd1]
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 1
v.convert wetlandcheckd@cenntenial_hm out=wetlandcheckd1
Reading dig file...
Input file is version 4.
Input file is portable.
0 points read to memory
5 lines read to memory
0 area boundaries read and written to output
0 dead points skipped
0 dead lines skipped
0 dead area boundaries skipped
0 elements of unknown type skipped
5 elements read to memory.
Reading dig_att file...
0 point categories read
0 line categories read
0 centroids read
0 dead point categories skipped
0 dead line categories skipped
0 dead centroids skipped
0 categories of unknown type skipped
0 categories read into memory.
Attaching categories...
Writing new file...
5 points and lines written to output file.
0 centroids written to output file.
No category labels (dig_cats) found, no table created.
Building topology ...
5 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 6
Number of primitives: 5
Number of points : 0
Number of lines : 5
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
GRASS 6.0.cvs (wakestate):~ > d.vect wetlandcheckd1 co=blue
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 0
-------------------------------------------- Managed by Request Tracker
Subject: impossible to remove imported vector file
Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
I am using GRASS CVS downloaded and compiled March 22.
In a transition from GRASS5.3 to GRASS6 I have converted quite a few files from old to new vector format using v.convert. Some work without any problems, but for some files, I cannot display them, but what is even worse, I cannot remove them. It would be great to get at least the possibility to remove the file before the next release. If I am just missing something, please let me know,
Helena
g.remove vect=wetlandcheckd1
REMOVE [wetlandcheckd1]
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 1
v.convert wetlandcheckd@cenntenial_hm out=wetlandcheckd1
Reading dig file...
Input file is version 4.
Input file is portable.
0 points read to memory
5 lines read to memory
0 area boundaries read and written to output
0 dead points skipped
0 dead lines skipped
0 dead area boundaries skipped
0 elements of unknown type skipped
5 elements read to memory.
Reading dig_att file...
0 point categories read
0 line categories read
0 centroids read
0 dead point categories skipped
0 dead line categories skipped
0 dead centroids skipped
0 categories of unknown type skipped
0 categories read into memory.
Attaching categories...
Writing new file...
5 points and lines written to output file.
0 centroids written to output file.
No category labels (dig_cats) found, no table created.
Building topology ...
5 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 6
Number of primitives: 5
Number of points : 0
Number of lines : 5
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
GRASS 6.0.cvs (wakestate):~ > d.vect wetlandcheckd1 co=blue
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 0
-------------------------------------------- Managed by Request Tracker
Subject: impossible to remove imported vector file
Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
I am using GRASS CVS downloaded and compiled March 22.
In a transition from GRASS5.3 to GRASS6 I have converted quite a few files from old to new vector format using v.convert. Some work without any problems, but for some files, I cannot display them, but what is even worse, I cannot remove them. It would be great to get at least the possibility to remove the file before the next release. If I am just missing something, please let me know,
Helena
g.remove vect=wetlandcheckd1
REMOVE [wetlandcheckd1]
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 1
v.convert wetlandcheckd@cenntenial_hm out=wetlandcheckd1
Reading dig file...
Input file is version 4.
Input file is portable.
0 points read to memory
5 lines read to memory
0 area boundaries read and written to output
0 dead points skipped
0 dead lines skipped
0 dead area boundaries skipped
0 elements of unknown type skipped
5 elements read to memory.
Reading dig_att file...
0 point categories read
0 line categories read
0 centroids read
0 dead point categories skipped
0 dead line categories skipped
0 dead centroids skipped
0 categories of unknown type skipped
0 categories read into memory.
Attaching categories...
Writing new file...
5 points and lines written to output file.
0 centroids written to output file.
No category labels (dig_cats) found, no table created.
Building topology ...
5 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 6
Number of primitives: 5
Number of points : 0
Number of lines : 5
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
GRASS 6.0.cvs (wakestate):~ > d.vect wetlandcheckd1 co=blue
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 0
-------------------------------------------- Managed by Request Tracker
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
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,
Subject: impossible to remove imported vector file
Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
I am using GRASS CVS downloaded and compiled March 22.
In a transition from GRASS5.3 to GRASS6 I have converted quite a few files from old to new vector format using v.convert. Some work without any problems, but for some files, I cannot display them, but what is even worse, I cannot remove them. It would be great to get at least the possibility to remove the file before the next release. If I am just missing something, please let me know,
Helena
g.remove vect=wetlandcheckd1
REMOVE [wetlandcheckd1]
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 1
v.convert wetlandcheckd@cenntenial_hm out=wetlandcheckd1
Reading dig file...
Input file is version 4.
Input file is portable.
0 points read to memory
5 lines read to memory
0 area boundaries read and written to output
0 dead points skipped
0 dead lines skipped
0 dead area boundaries skipped
0 elements of unknown type skipped
5 elements read to memory.
Reading dig_att file...
0 point categories read
0 line categories read
0 centroids read
0 dead point categories skipped
0 dead line categories skipped
0 dead centroids skipped
0 categories of unknown type skipped
0 categories read into memory.
Attaching categories...
Writing new file...
5 points and lines written to output file.
0 centroids written to output file.
No category labels (dig_cats) found, no table created.
Building topology ...
5 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 6
Number of primitives: 5
Number of points : 0
Number of lines : 5
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
GRASS 6.0.cvs (wakestate):~ > d.vect wetlandcheckd1 co=blue
ERROR: Cannot open old vector wetlandcheckd1@wrricc on level 0
-------------------------------------------- Managed by Request Tracker
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?
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)
The header in < 6 is stored in the binary file, it is read by dig__fread_port_C and set by Vect_set_*.