[GRASSLIST:5666] Re: v.in.ascii Grass6.0

Hamish hamish_nospam at yahoo.com
Mon Feb 7 18:08:57 EST 2005


> here ist he error log from the import with v.in.ascii What is wrong?
..
> v.in.ascii input=/home/Jan_Bartholdy/cities.dat output=cities
> format=point fs=| 'columns='\''x double, y double, name string'\'''
> x=1 y=2 z=0 cat=0

most of these have been pointed out by others already, but putting it
all together on the command line:


v.in.ascii input=/home/Jan_Bartholdy/cities.dat output=cities \
  fs='|' columns='x double, y double, name varchar(20)' x=1 y=2

or more simply, using the defaults:

v.in.ascii input=/home/Jan_Bartholdy/cities.dat output=cities


and it should work. (fs='|' x=1 y=2 is default so you can just leave
them off; columns= is auto-detected in this case)


-  when used on the command line, "|" needs to be quoted. Otherwise the
shell interprets it as the pipe command.

-  use varchar(size) to denote a string column of a certain number of
characters


> The line was created by tcltkgrass (d.m respectively) 

Unfortunately the command as shown by the d.m menus will not always run
as-is on the command line. Mostly it will though. (translating that into
shell format before printing in the Tcl window is GRASS wish # 2074)

- things entered into the Tcl windows should be quoted automatically if
needed. Quoting in the GUI text input box is redundant and will just
confuse it (all the '\'' stuff in your example). Multi-word options
entered on the command line must be quoted so the shell isn't confused.
The module help examples showing quotation marks are for the command
line and shouldn't be entered in the GUI.

- as above, special chars (eg "|" used with fs=) need to be quoted when
used on the command line. Currently the tcl parser only checks for
spaces(?), it should probably check for * | ? etc. too...

- Unlike 5.0's tcltkgrass menus, all default values are added to the
command listing, not just for things you have added. For modules like
d.vect, this can make the noise stronger than the signal when viewed by
a human.



Hamish




More information about the grass-user mailing list