[GRASSLIST:10237] v.in.ascii quirk

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):~ >

Stuart,

On Thu, 9 Feb 2006 19:36:39 -0500
Stuart Edwards <sedwards2@cinci.rr.com> wrote:

<snip>

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

Are you by any chance putting 'x double, y double, z double' in GUI?
You should't - put plain x double, y double, z double instead - no '
at the beginning and at the end. Despite of what the "hint" in the GUI
itself suggests. This is a known problem -
https://intevation.de/rt/webrt?serial_num=4024.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

Yes, I did have the ' ' in place. However when I run the GUI without them, the .dbf file still is not created.

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

The GUI appears to have inserted ' ' around the whole phrase starting at 'columns rather than just around 'x double, etc. I also tried leaving the ' ' out of the field separator field with similar results.

Stu
On Feb 10, 2006, at 5:26 AM, Maciek Sieczka wrote:

Stuart,

On Thu, 9 Feb 2006 19:36:39 -0500
Stuart Edwards <sedwards2@cinci.rr.com> wrote:

<snip>

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

Are you by any chance putting 'x double, y double, z double' in GUI?
You should't - put plain x double, y double, z double instead - no '
at the beginning and at the end. Despite of what the "hint" in the GUI
itself suggests. This is a known problem -
https://intevation.de/rt/webrt?serial_num=4024.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/