[GRASSLIST:10237] v.in.ascii quirk

Stuart Edwards sedwards2 at cinci.rr.com
Thu Feb 9 19:36:39 EST 2006


Hi --

GRASS61.cvs on OSX 10.4.4

This is a little puzzle that has kept me entertained (?) for a couple  
of days.  When I input a points table using v.in.ascii and the GUI,  
no .dbf file is created, even though the command appears to execute  
properly (based on the output and the fact that I can display the  
points).  When I do the same thing on the command line using a format  
that I found on GRASSLIST:8792 (thanks Hamish), the .dbf file is  
created.  I tried running the same syntax from the GUI output, but at  
the command line and it again failed to create a .dbf file. So I have  
to conclude that the GUI is creating some syntax that prevents the  
creation of the .dbf file.  If this is a well known problem, ok stop  
reading.

  If not, below are the three outputs from the above tests.  There  
are clearly some syntax differences, but I'm not knowledgeable enough  
to understand the significance.  I thought the -z flag might be the  
problem, but adding the -z flag to the third test works ok too as  
long as z=3 is added.  I'm ok with the command line solution, but it  
seems that the GUI is a nice feature and should work as planned.

Regards
Stu

test 1
Output from v.in.ascii executed using GRASS GUI --- no .dbf file was  
created, although the command appeared to have run correctly.

v.in.ascii input=/Users/stu/Desktop/grasstest/fivepoints  
output=fivecorners format=point 'fs='\'' '\''' skip=1 \
'columns='\''x double, y double, z double'\''' x=1 y=2 z=3 cat=0 -z

Maximum input row length: 16
Maximum number of columns: 3
Minimum number of columns: 3
Building topology ...
Registering lines:
5 primitives registered
Building areas:

0 areas built
0 isles built
Attaching islands:
Attaching centroids:
Topology was built.
Number of nodes     :   5
Number of primitives:   5
Number of points    :   5
Number of lines     :   0
Number of boundaries:   0
Number of centroids :   0
Number of areas     :   0
Number of isles     :   0

test 2
Output from v.in.ascii executed from the command line using the  
output from the GUI as a formatting guide  -- no .dbf file created  
although
again, the command appeared to run correctly.

GRASS 6.1.cvs (tinatown):~ > v.in.ascii input=/Users/stu/Desktop/ 
grasstest/fivepoints output=fivecorner format=point 'fs='\'' '\'''  
skip=1 'columns='\''x double,y double, z double'\''' x=1 y=2 z=3  
cat=0 -z

Maximum input row length: 16
Maximum number of columns: 3
Minimum number of columns: 3
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     :   5
Number of primitives:   5
Number of points    :   5
Number of lines     :   0
Number of boundaries:   0
Number of centroids :   0
Number of areas     :   0
Number of isles     :   0
GRASS 6.1.cvs (tinatown):~ >



test 3
Output from v.in.ascii executed from the command line using format by  
Hamish in GRASSLIST:8792 (I added the fs=' ' because it hung  
otherwise -- file ...../dbf/fivecorner.dbf was created


GRASS 6.1.cvs (tinatown):~ > v.in.ascii in=/Users/stu/Desktop/ 
grasstest/fivepoints out=fivecorner x=1 y=2 skip=1 columns='x double,  
y double, z double' fs=' '

Maximum input row length: 16
Maximum number of columns: 3
Minimum number of columns: 3
column: 1  type: double
column: 2  type: double
column: 3  type: double
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     :   5
Number of primitives:   5
Number of points    :   5
Number of lines     :   0
Number of boundaries:   0
Number of centroids :   0
Number of areas     :   0
Number of isles     :   0
GRASS 6.1.cvs (tinatown):~ >




More information about the grass-user mailing list