Ok, without white space the command run correctly.<br>Grass 6.4 and 6.5 "don't like" white space in a character string. <br>No problem with * character!<br><br>Many thanks <br><br>Roberto <br><br><br><br><br>
<div class="gmail_quote">2009/5/5 Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Roberto,<br>
<br>
I can reproduce the problem:<br>
<br>
GRASS 6.5.svn (spearfish60):/tmp > v.in.ascii -z input=profilo_30.txt<br>
<div class="im">output=name_output format=point fs=" " skip=0 x=1 y=2 z=3 cat=0<br>
</div>Scanning input for column types...<br>
Maximum input row length: 35<br>
Maximum number of columns: 10<br>
Minimum number of columns: 4<br>
Importing points...<br>
100%<br>
Populating table...<br>
dbmi: Protocol error<br>
...<br>
<br>
No good.<br>
<br>
GRASS 6.5.svn (spearfish60):/tmp > g.gisenv set=DEBUG=3<br>
<br>
GRASS 6.5.svn (spearfish60):/tmp > v.in.ascii -z input=profilo_30.txt<br>
<div class="im">output=name_output format=point fs=" " skip=0 x=1 y=2 z=3 cat=0 --o<br>
</div>D2/3: Vect_open_new(): name = name_output<br>
...<br>
D2/3: load_table_head(): tab = 30,<br>
/home/neteler/grassdata/spearfish60/neteler/dbf//name_output.dbf<br>
D3/3: Doing SQL command <3> on DBF table... (see include/sqlp.h)<br>
D2/3: load_table(): tab = 30<br>
100%<br>
Populating table...<br>
D2/3: Commit transaction<br>
...<br>
D2/3: save_table 27<br>
D2/3: save_table 28<br>
D2/3: save_table 29<br>
D2/3: save_table 30<br>
D2/3: Write table to tempfile:<br>
'/home/neteler/grassdata/spearfish60/neteler/.tmp/host550/17010.dbf'<br>
D2/3: Write 108 rows<br>
dbmi: Protocol error<br>
D3/3: Vect_build(): build = 4<br>
Building topology for vector map <name_output><br>
...<br>
<br>
The file /home/neteler/grassdata/spearfish60/neteler/.tmp/host550/17010.dbf<br>
is only of<br>
1 byte size, so corrupted.<br>
<br>
Using the SQLite driver, I get a more useful error message:<br>
<br>
DBMI-SQLite driver error:<br>
Error in sqlite3_prepare():<br>
table name_output has 11 columns but 10 values were supplied<br>
D2/3: G__home home = /home/neteler<br>
ERROR: Unable to insert new record: insert into name_output values ( 1,<br>
715514.14, 93561.67, 304.19, '53', null, null, null, null, null)<br>
<br>
As we see: 5 empty columns are recognized.<br>
This is because there are white spaces at the end of the first row,<br>
maybe elsewhere, too.<br>
<br>
So: GRASS is working but the error trapping in the DBF driver isn't<br>
that good (the SQLite driver is better here).<br>
<br>
Solution: polish the data file...<br>
<font color="#888888"><br>
Markus<br>
</font>PS: the * in some rows will also cause problems.<br>
<br>
On Tue, May 5, 2009 at 10:55 PM, roberto.marzocchi<br>
<div class="im"><<a href="mailto:roberto.marzocchi@gmail.com">roberto.marzocchi@gmail.com</a>> wrote:<br>
</div><div><div></div><div class="h5">> I have the same problem in the command line (using fs=' ') and using the<br>
> GUI without quoting<br>
> maybe i have a problem with libraries....?<br>
><br>
> R<br>
><br>
><br>
><br>
> Moritz Lennert ha scritto:<br>
>><br>
>> On 05/05/09 17:45, roberto marzocchi wrote:<br>
>>><br>
>>> in attached the input file<br>
>>><br>
>>> in grass6.3.0 the command run, the problem is only with the last grass<br>
>>> version<br>
>><br>
>> Have you tried quoting the fs, i.e.:<br>
>><br>
>> v.in.ascii -z input=fle_input output=name_output format=point fs=' '<br>
>> skip=0 x=1 y=2 z=3 cat=0 --overwrite<br>
>><br>
>> Running it without quoting, I get:<br>
>><br>
>> ERROR: y column number > minimum last column number<br>
>> (incorrect field separator?)<br>
>><br>
>> With quoting it works (in the grass6 development branch).<br>
>><br>
>> How are you running this command ? On the command line ? In the GUI ?<br>
>><br>
>> Moritz<br>
>><br>
>>><br>
>>> R<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> 2009/5/5 Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a><br>
>>> <mailto:<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>>><br>
>>><br>
>>> On 05/05/09 14:07, roberto marzocchi wrote:<br>
>>><br>
>>> v.in.ascii -z input=fle_input output=name_output format=point<br>
>>> fs= skip=0 x=1 y=2 z=3 cat=0 --overwrite --quiet<br>
>>><br>
>>> Output:<br>
>>> ******************************************************<br>
>>> Segmentation fault<br>
>>> dbmi: Protocol error<br>
>>> ******************************************************<br>
>>><br>
>>> Grass import correctly the points, but don't create the<br>
>>> associated table. anyone know the reason?<br>
>>><br>
>>><br>
>>> Is there any attribute data contained in the input file ? It would<br>
>>> help if you sent us at least the first few lines of the data.<br>
>>><br>
>>> Also fs= seems weird. What is the field separator in the file ?<br>
>>><br>
>>> Moritz<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> Please consider the environment before printing this mail note!<br>
>>><br>
>><br>
>><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> grass-dev mailing list<br>
> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Roberto Marzocchi<br>SUPSI-Istituto scienze della terra -Institute of Earth Sciences<br>Via Trevano C.P. 72 6952 Canobbio Switzerland<br>Phone: +41 58 6666 212<br>
Fax: +41 58 6666 209<br><br>E-mail: roberto.marzocchi@supsi.ch<br>Internet: <a href="http://www.ist.supsi.ch">www.ist.supsi.ch</a><br><br> <br>Please consider the environment before printing this mail note!<br>