On Thu, 2006-03-09 at 11:32 +1300, Hamish wrote:
> I think your command should look something like this:
>
> v.in.ascii input=/home/pierluigi/Desktop/zinc output=zinc format=point
> fs=| columns='x double, y double, ppm double' x=1 y=2
>From the command line yes, but quote the pipe (|).
so if you try:
G6> v.in.ascii input=/home/pierluigi/Desktop/zinc output=zinc \
format=point fs='|' columns='x double, y double, ppm double' x=1 y=2
It should be ok. The shell needs to be protected from special chars
(pipe is the redirect command) and also needs to be told that multiword
answers belong with a single option. The GUI and SQL don't need to be
protected as such.
If you are running from the GUI, you should not quote the pipe (|) or
the column names/types:
> SQL parser error in statement:
> create table zinc ( cat integer, 'x double precision, y double
> precision, ppm double precision' )
The ' before the x and after precision should not be there. You are
quoting too much.
> I realised that the gui of v.in.ascii usually puts together the
> command incorrectly, so I always use the cli to import ascii files.
How so? If it is broken we can fix it, but I don't think it is broken.
I tried to run import from gui, and it run well, though the generated
command is a bit strange because it qoutes the whole column parameter,
not only the part after the "=" sign:
v.in.ascii input=/home/stefi/Munka/TokolB/terepszint-total-grassba.csv
output=furasok2 format=point fs=| skip=0 'columns=furasjel varchar(10),
x double, y double, mbf double' x=2 y=3 z=0 cat=0
In cli the coulmn parameter should be written like this:
columns='furasjel varchar(10), x double, y double, mbf double'
And I think that the gui is a bit misleeding, because it says for the
column parameters that they should be qouted. But if I qoute them, the
generated command will look like this:
v.in.ascii input=/home/stefi/Munka/TokolB/terepszint-total-grassba.csv
output=furasok3 format=point fs=| skip=0 'columns='\''furasjel
varchar(10), x double, y double, mbf double'\''' x=2 y=3 z=0 cat=0
That's why a lot of people get error when try to import using the gui.
Best regards,
Istvan