<!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>
I had ask these questions to Maciek. For completeness I am sending them again to the forum along with his answers and new questions:<BR>
<BR>
I just imported:<BR>
> <BR>
> #'X_COORDINATE Y_COORDINATE'<BR>
> L 2 1<BR>
> 3400630.04 5718486.603 1982 2.88<BR>
> 3400639.238 5718515.776 1982 2.88<BR>
> 1 1<BR>
> L 2 1<BR>
> 3400639.238 5718515.776 1982 3.77<BR>
> 3400648.641 5718546.057 1982 3.77<BR>
> 1 182<BR>
> L 2 1<BR>
> 3400648.641 5718546.057 1982 4.7<BR>
> 3400665.041 5718562.99 1982 4.7<BR>
> 1 181<BR>
> <BR>
> both with and without -n and it worked in the same way.<BR>
> <BR>
> But now I have a question. This file contains not only coordinates but<BR>
> also 2 attributes: "Year" and "Depth" in the columns 3 and 4. If I<BR>
> follow the instructions of v.in.ascii manual:<BR>
> <BR>
> "The coordinates are listed following the initial line containing the<BR>
> primitive code, the total number of vectors in the series, and the<BR>
> number of categories (1 for a single layer, higher for multiple layers).<BR>
> Below that 1 or several lines follow to indicate the layer number and<BR>
> the category number (ID)."<BR>
> <BR>
> I rewrite my file like:<BR>
> <BR>
> #'X_COORDINATE Y_COORDINATE'<BR>
> L 2 2<BR>
> 3400630.04 5718486.603 1982 2.88<BR>
> 3400639.238 5718515.776 1982 2.88<BR>
<BR>
I don't think you can import vector in standard format together with<BR>
it's attributes using v.in.ascii. It's possible only for points format.<BR>
In standard format, the "1982 2.88" etc. after x,y coordinates are<BR>
discarded.<BR>
<BR>
To add attributes to your lines vector created with v.in.ascii, you<BR>
would need to create the table separately (eg. a dbf with OO.org Calc<BR>
or OO.org Base, or using the db.execute to create the table and<BR>
populate it with values) and then attach it to your lines vector uisng<BR>
v.db.connect.<BR>
<BR>
To understand how categories and layers work, please refer to the<BR>
"Vector data processing in GRASS GIS" chapter of the manual.<BR>
<BR>
> 2 1<BR>
> L 2 2<BR>
> 3400639.238 5718515.776 1982 3.77<BR>
> 3400648.641 5718546.057 1982 3.77<BR>
> 1 182<BR>
> 2 182<BR>
> L 2 2<BR>
> 3400648.641 5718546.057 1982 4.7<BR>
> 3400665.041 5718562.99 1982 4.7<BR>
> 1 181<BR>
> 2 181<BR>
> <BR>
> The last 2 in the first line for the number of attributes, isn't it? <BR>
> And data are rightly imported:<BR>
> <BR>
> Erzeuge Topologie ...<BR>
> 3 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 : 4<BR>
> Anzahl von Primitives : 3<BR>
> Anzahl von Punkten : 0<BR>
> Anzahl von Linien : 3<BR>
> Anzahl von Boundaries : 0<BR>
> Anzahl von Zentroiden : 0<BR>
> Anzahl von Flächen : 0<BR>
> Anzahl von Inseln : 0<BR>
> <BR>
> But I have to admit, I'm still confused with the concept of layer and<BR>
> category in GRASS; i.e., I wrote these lines:<BR>
> 1 182<BR>
> 2 182<BR>
> Like first line1 for Layer 1 and 182 from original line ID of my data<BR>
> and second line<BR>
> and second line for Layer 2 and 182 from original line ID of my data<BR>
> was this right?<BR>
<BR>
You propbaly mean this part:<BR>
<BR>
> L 2 2<BR>
> 3400648.641 5718546.057 1982 4.7<BR>
> 3400665.041 5718562.99 1982 4.7<BR>
> 1 181<BR>
> 2 181<BR>
<BR>
If you wanted the given line, consinsted of 2 vertices, to have 2<BR>
attribute links (categories), one in the layer 1 and the other in layer<BR>
2, both with category number "182", you did it right.<BR>
<BR>
<BR>
<FONT COLOR="#0000ff">Oh, I think I misunderstood the concept of category:</FONT><BR>
<BR>
<FONT COLOR="#0000ff">Actually, what I want to do is to create layers 1 and 2 for each line and that those have attribute values in the fields "Year" and "Depth" in the table below:</FONT><BR>
<BR>
<FONT COLOR="#0000ff">L 2 2</FONT><BR>
<FONT COLOR="#0000ff">3400648.641 5718546.057 1982 4.7</FONT><BR>
<FONT COLOR="#0000ff">3400665.041 5718562.99 1982 4.7</FONT><BR>
<FONT COLOR="#0000ff">1 181</FONT><BR>
<FONT COLOR="#0000ff">2 181</FONT><BR>
<BR>
<FONT COLOR="#0000ff">Table:</FONT><BR>
<FONT COLOR="#0000ff">LineID Year Depth </FONT><BR>
<FONT COLOR="#0000ff">1 1982 2.88</FONT><BR>
<FONT COLOR="#0000ff">182 1982 3.77</FONT><BR>
<FONT COLOR="#0000ff">181 1982 4.7</FONT><BR>
<BR>
<FONT COLOR="#0000ff">So I guess, I have to import the line geometry like</FONT><BR>
<FONT COLOR="#0000ff"> </FONT><BR>
<FONT COLOR="#0000ff"> #'X_COORDINATE Y_COORDINATE'</FONT><BR>
<FONT COLOR="#0000ff">L 2 1</FONT><BR>
<FONT COLOR="#0000ff">3400630.04 5718486.603</FONT><BR>
<FONT COLOR="#0000ff">3400639.238 5718515.776</FONT><BR>
<FONT COLOR="#0000ff">1 2</FONT><BR>
<FONT COLOR="#0000ff">2 3</FONT><BR>
<FONT COLOR="#0000ff">L 2 1</FONT><BR>
<FONT COLOR="#0000ff">3400639.238 5718515.776</FONT><BR>
<FONT COLOR="#0000ff">3400648.641 5718546.057</FONT><BR>
<FONT COLOR="#0000ff">1 2</FONT><BR>
<FONT COLOR="#0000ff">2 3</FONT><BR>
<FONT COLOR="#0000ff">L 2 1</FONT><BR>
<FONT COLOR="#0000ff">3400648.641 5718546.057</FONT><BR>
<FONT COLOR="#0000ff">3400665.041 5718562.99</FONT><BR>
<FONT COLOR="#0000ff">1 2</FONT><BR>
<FONT COLOR="#0000ff">2 3</FONT><BR>
<BR>
<FONT COLOR="#0000ff">Each line having layers 1 and 2 that connect to values in the categories 2 and 3.??</FONT><BR>
<BR>
<FONT COLOR="#0000ff">Or from the example in v.in.ascii manual is still not so clear what the line below the data means???</FONT><BR>
<BR>
<FONT COLOR="#0000ff">ORGANIZATION: GRASS Development Team </FONT><BR>
<FONT COLOR="#0000ff">DIGIT DATE: 1/9/2005 </FONT><BR>
<FONT COLOR="#0000ff">DIGIT NAME: - </FONT><BR>
<FONT COLOR="#0000ff">MAP NAME: test </FONT><BR>
<FONT COLOR="#0000ff">MAP DATE: 2005 </FONT><BR>
<FONT COLOR="#0000ff">MAP SCALE: 10000 </FONT><BR>
<FONT COLOR="#0000ff">OTHER INFO: Test polygons </FONT><BR>
<FONT COLOR="#0000ff">ZONE: 0 </FONT><BR>
<FONT COLOR="#0000ff">MAP THRESH: 0.500000 </FONT><BR>
<FONT COLOR="#0000ff">VERTI: </FONT><BR>
<FONT COLOR="#0000ff">B 6 1 </FONT><BR>
<FONT COLOR="#0000ff">5958812.48844435 3400828.84221011 </FONT><BR>
<FONT COLOR="#0000ff">5958957.29887089 3400877.11235229 </FONT><BR>
<FONT COLOR="#0000ff">5959021.65906046 3400930.7458436 </FONT><BR>
<FONT COLOR="#0000ff">5959048.47580612 3400973.65263665 </FONT><BR>
<FONT COLOR="#0000ff">5959069.92920264 3401032.64947709 </FONT><BR>
<FONT COLOR="#0000ff">5958812.48844435 3400828.84221011 </FONT><BR>
<FONT COLOR="#0000ff">1 1 </FONT><BR>
<FONT COLOR="#0000ff">B 4 1 </FONT><BR>
<FONT COLOR="#0000ff">5959010.9323622 3401338.36037757 </FONT><BR>
<FONT COLOR="#0000ff">5959096.7459483 3401370.54047235 </FONT><BR>
<FONT COLOR="#0000ff">5959091.38259917 3401450.99070932 </FONT><BR>
<FONT COLOR="#0000ff">5959010.9323622 3401338.36037757 </FONT><BR>
<FONT COLOR="#0000ff">1 2</FONT><BR>
<BR>
<FONT COLOR="#0000ff">Does it mean that the first boundary has the layer 1 related to the category with number ID 1 and the second boundary has the layer 1 related to the category 2 with number ID? It doesn't make much sense.</FONT><BR>
<BR>
<FONT COLOR="#0000ff">and then use v.db.connect to assign the geometric entities with the values in the table. But when I get through the v.db.connect manual is not clear to me how records and fields on the table are correctly assigned to the respective lines??</FONT><BR>
<BR>
<FONT COLOR="#0000ff">Jorge</FONT><BR>
<BR>
> On the other hand how can I classify and visualise these data with<BR>
> GRASS?<BR>
<BR>
d.vect, d.vect.thematic<BR>
<BR>
Both available via gis.m and d.m as well as from command line. There is<BR>
also QGIS which has nice thematic mapping capabilities and reads GRASS<BR>
vectors.<BR>
<BR>
P.S.<BR>
<BR>
Please don't ask question offlist. It's better to let others participate.<BR>
<BR>
Cheers,<BR>
Maciek<BR>
<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>