<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Martin Landa schrieb:
<blockquote
cite="mid:f8fe65c40802040328n4695c26cpd74a1d789b6a86fb@mail.gmail.com"
type="cite">
<pre wrap="">Hi,
2008/2/4, Philipp Steigenberger <a class="moz-txt-link-rfc2396E" href="mailto:userlist@online.de"><userlist@online.de></a>:
</pre>
<blockquote type="cite">
<pre wrap="">I have cross-profiles of a river and want to create a terrainmodel.
To interpolate only there, where points are, I want to create a hull.
v.hull doesn't work, cause - how to explain... - imagine, the river has
the form of the letter 'S' with v.hull I get a form whisch is almost
like a 'D'.
Therfore I extracte all the lines where I have the points of the
right(r) /left(l) side of the cross-profile
I sort them like
cat name
1 l 1
2 l 2
3 l 3
4 l 4
5 r 4
6 r 3
7 r 2
8 r 1
so it looks like:
1 4417744.050 5363469.320 461.10400 0.20000 P1(li)
2 4417723.140 5363269.800 461.83000 0.40000 P1(left)
3 4417716.890 5363068.970 461.40100 0.60000 P1(left)
4 4417705.220 5362867.590 461.93600 0.80000 P1(left)
354 4403074.030 5335808.330 559.44700 34.00000 P2(right)
355 4402974.470 5335628.060 559.60400 34.20000 P2(right)
356 4402876.360 5335452.300 560.11700 34.40000 P2(right)
357 4402779.380 5335277.370 561.11800 34.60000 P2(right)
I add
A 357 1 in the first line and
1 1 in the last line
Now I want to import this as an area:
cat wertach.asc | v.in.ascii --o output=wertach skip=1 -z z=4 cat=1 x=2
y=3 colum='cat int, x double, y double, z double, name01 varchar(20),
name02 varchar(20)' fs=' '
and get
Scanning input for column types...
Maximum input row length: 54
Maximum number of columns: 6
Minimum number of columns: 2
ERROR: y column number > minimum last column number
(incorrect field separator?)
so I delete the last line and get
Scanning input for column types...
Maximum input row length: 54
Maximum number of columns: 6
Minimum number of columns: 6
WARNING: Column number 5 defined as string has double values
Importing points...
Populating table...
Building topology for vector map <wertach>...
357 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built
Number of nodes : 357
Number of primitives: 357
Number of points : 357
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
v.in.ascii complete.
NO AREA :o(
If I try
B 357 1 for a boundary I get the same
Scanning input for column types...
Maximum input row length: 54
Maximum number of columns: 6
Minimum number of columns: 6
WARNING: Column number 5 defined as string has double values
Importing points...
Populating table...
Building topology for vector map <wertach>...
357 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built
Number of nodes : 357
Number of primitives: 357
Number of points : 357
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
v.in.ascii complete.
NO BOUNDARY :o(
what went wrong? How to bulid an area? Do I need a centroid? How to get it?
Or do I only need x and y -values to create the area?
</pre>
</blockquote>
<pre wrap=""><!---->
Please, take a look at v.in.ascii manual page where GRASS ASCII format
is described. E.g.
B 2 1
595521.680672 4925244.201681
593757.983193 4917668.319328
1 1
B 5 1
593757.983193 4917668.319328
593757.983193 4917668.319328
603618.655462 4915223.193277
606344.369748 4923801.176471
595521.680672 4925244.201681
1 1
B 4 1
595521.680672 4925244.201681
589468.991597 4926727.310924
587945.798319 4918670.420168
593757.983193 4917668.319328
1 2
C 1 1
599449.915966 4920554.369748
1 3
C 1 1
591072.352941 4922077.563025
1 4
defines three boundaries (category 1,2) and two centroids (cat 3,4).
cat input.txt | v.in.ascii out=xx for=standard -n --o
Note that you need to specify input format (default format is 'points'
not 'standard'). After import you can also add missing centroids using
v.centroids module.
Martin
</pre>
</blockquote>
<font face="Helvetica, Arial, sans-serif">Martin,<br>
I always use the help and man pages when I work within GRASS, but do
not understand everything...<br>
I also have the new Neteler & Mitasova...<br>
<br>
Now I know which syntax I need for ponts and which for standard (lines
etc.)<br>
Is it is important to have leading blanks in front of the points? Or is
it just for clarity?</font><br>
<pre wrap=""><big>B 5 1
593757.983193 4917668.319328
593757.983193 4917668.319328
603618.655462 4915223.193277
606344.369748 4923801.176471
595521.680672 4925244.201681
2 3
</big></pre>
<pre wrap=""><big><font face="Helvetica, Arial, sans-serif"><big>For my own clarity</big>
<big>B for Boundary, L for Lin,e A for Area, C for Centroid, and P for Point</big>
<big>5 is the number of points</big>
<big>1 ??? Neteler & Mitasova describe "1 for a single category" - what does this mean? </big>
<big>2 is the layer number</big>
<big>3 is the category ID </big>
<big>In your example the first and second boundary have the same cat ID. Why?</big>
<big>More and more I understand this vektor-thing in GRASS - but I still need some time ;o)</big>
<big>Thanks a lot</big>
<big>om shantih</big>
<big>Philipp</big></font></big>
</pre>
<pre wrap="">
</pre>
<br>
<br>
</body>
</html>