<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.12.2">
</HEAD>
<BODY>
Thanks for your comments.<BR>
<BR>
I rewrote my file like this:<BR>
"X_COORDINATE","Y_COORDINATE"<BR>
L 2 1<BR>
3400630.04 5718486.603<BR>
3400639.238 5718515.776<BR>
1 1<BR>
L 2 1<BR>
3400639.238 5718515.776<BR>
3400648.641 5718546.057<BR>
1 2<BR>
L 2 1<BR>
3400648.641 5718546.057<BR>
3400665.041 5718562.99<BR>
1 3<BR>
L 2 1<BR>
3400665.041 5718562.99<BR>
3400625.996 5718597.349<BR>
1 4<BR>
<BR>
Then I perform the import:<BR>
<BR>
GRASS 6.2.1 (luenenxy):~ > v.in.ascii input=/home/jorge/GrassGIS/luenenxy/jorge/koord1.csv out=koord_grass format=standard --overwrite skip=1 cat=0 fs='space'<BR>
WARNUNG: Die Vektorkarte 'koord_grass' existiert bereits und wird<BR>
überschrieben.<BR>
Error reading ascii file:<BR>
[ ]<BR>
Erzeuge Topologie ...<BR>
4 primitives registriert<BR>
Building areas: 100%<BR>
0 Flächen erstellt<BR>
0 Inselflächen erstellt<BR>
Füge Inselflächen hinzu:<BR>
Füge Zentroide hinzu: 100%<BR>
Die Topologie wurde erstellt.<BR>
Anzahl von Knoten : 5<BR>
Anzahl von Primitives : 4<BR>
Anzahl von Punkten : 0<BR>
Anzahl von Linien : 4<BR>
Anzahl von Boundaries : 0<BR>
Anzahl von Zentroiden : 0<BR>
Anzahl von Flächen : 0<BR>
Anzahl von Inseln : 0<BR>
GRASS 6.2.1 (luenenxy):~ > <BR>
<BR>
It seems to recognise the entities in the file but what does this error message means ???<BR>
<BR>
Error reading ascii file:<BR>
[ ] ??? <BR>
<BR>
Thanks in advace,<BR>
<BR>
Jorge<BR>
<BR>
Am Donnerstag, den 08.03.2007, 23:17 +0100 schrieb Moritz Lennert:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On 08/03/07 18:00, Jorge Echeverri wrote:</FONT>
<FONT COLOR="#000000">> Hi,</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I have to admit that I am an absolute beginner in GRASS.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I need to import vector data from a text-file with this format:</FONT>
<FONT COLOR="#000000">> x-begin,y-begin,x-end,y-end</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Any suggestion?</FONT>
<FONT COLOR="#000000">v.in.ascii</FONT>
<FONT COLOR="#000000">You will have to transform your data (e.g. with awk) to fit the standard </FONT>
<FONT COLOR="#000000">format. Something like this (untested) should work:</FONT>
<FONT COLOR="#000000">awk -F"," 'BEGIN{i=0} {i++;print "L 2 1";print $1,$2,i;i++;print </FONT>
<FONT COLOR="#000000">$3,$4,i;print "1"}' YourFile | v.in.ascii -n format=standard </FONT>
<FONT COLOR="#000000">out=YourMapName fs=" "</FONT>
<FONT COLOR="#000000">See the v.in.ascii man page for details.</FONT>
<FONT COLOR="#000000">Moritz</FONT>
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
--
Jorge Echeverri, BSc Civ. Eng.
S & P CONSULT GMBH
Technologiequartier
Konrad-Zuse-Str. 6
D-44801 Bochum, Germany
Geschäftsführer: Dipl.-Ing. Robert Stein
Registergericht: Amtsgericht Bochum HRB 10769
Phone: +49(0) 234 51 67 193
Fax: +49(0) 234 51 67 109
Email: <A HREF="mailto:jorge.echeverri@stein.de">jorge.echeverri@stein.de</A>
Internet: <A HREF="http://www.stein.de">www.stein.de</A>
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>