Hi Daniel,<br><br>Guess I should've investigated the data a bit closer, but I found a quick workaround so I didn't really bother too much.<br><br>I generate these vectors with a little app. It should be easy enough to detect these dodgy points before sending them to grass.
<br><br>Thanks!<br><br>Andre<br><br><br><div class="gmail_quote">On Dec 15, 2007 3:38 PM, Daniel Bundala <<a href="mailto:bundala@gmail.com">bundala@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I am not 100% certain as I did not test it, but I think that the<br>problem is that the very last line in myvect map contains 2 points at<br>the exactly same position (131.5, 67.5). Actually, you are so lucky to
<br>get this (faulty?) behaviour:) because this occurs only if there is<br>exactly one point in between them. In your case, 2nd and 4th points<br>have the same position whereas 3rd is at a different position.<br><br>Possible solutions are:
<br>-Firstly, is your map correct? I mean, does it make a sense to you<br>that one of your lines is of this strange shape?<br>-If yes, then I believe that the behaviour of the algorithm is<br>undefined. Because Hermitian interpolation needs to have some "notion"
<br>of a tangent at each point. And I really don't know what can be a good<br>choice of a tangent at points like your 3rd point on the last line.<br>-So you can either use different smoothing algorithm (Chaiken?) or<br>
shuffle the second and fourth point little bit so that they do not<br>coincide. In other words, translate the second point to 131.5000001<br>67.500001 and fourth point to 131.49999999 67.499999 say. In the later<br>case, I doubt that the output of
v.generalize will be particularly<br>nice......<br><br>Hope this helps,<br>Daniel<br><div><div></div><div class="Wj3C7c"><br>On Dec 14, 2007 4:41 PM, Andre Hauptfleisch <<a href="mailto:ahaupt@gmail.com">ahaupt@gmail.com
</a>> wrote:<br>> I've attached the myvect and myvect_smooth files.<br>><br>> Thanks for the help!!<br>><br>><br>><br>><br>> On Dec 14, 2007 4:53 PM, Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">
mlennert@club.worldonline.be</a> ><br>> wrote:<br>> ><br>> > On 14/12/07 15:37, Andre Hauptfleisch wrote:<br>> > > I'll try to upload the vector layer I used to an ftp site. What would<br>> > > the best output format be? DXF?
<br>> ><br>> > You can just use the output of v.out.ascii. If the file is not too<br>> > large, you can zip the output and send it to me directly.<br>> ><br>> > Moritz<br>> ><br>> >
<br>> > ><br>> > ><br>> > > On Dec 14, 2007 4:13 PM, Moritz Lennert < <a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a><br>> ><br>> ><br>> ><br>
> > > <mailto: <a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>>> wrote:<br>> > ><br>> > > On 14/12/07 14:48, Andre Hauptfleisch wrote:<br>> > > > Good day guys,
<br>> > > ><br>> > > > I came across a problem in the v.generalize module. I do the<br>> > > following:<br>> > > > v.generalize input=myvect@test output=myvect_smooth type=line
<br>> > > > method=hermite threshold=10<br>> > > ><br>> > > > I then do a v.out.svg and noticed the following line in the svg<br>> file:<br>> > > > <path gg:cat="31" d="M
111.500000 -80.500000 l 8.734748 4.771559<br>> > > > 9.907176 6.337565 nan nan nan nan nan nan nan nan nan nan" /><br>> > > ><br>> > > > Any idea how I can get rid of those nan's? They cause stuff such
<br>> as<br>> > > > v.to.rast to hang.<br>> > ><br>> > > I cannot reproduce this with the speafish60 dataset:<br>> > ><br>> > > v.out.svg input=roads@PERMANENT
output=roads type=line precision=6<br>> > > layer=1<br>> > ><br>> > > and<br>> > ><br>> > > v.generalize input=roads@PERMANENT output=roads_smooth type=line<br>> > > method=hermite threshold=10 look_ahead=7 reduction=50 slide=
0.5<br>> > > angle_thresh=3 degree_thresh=0 closeness_thresh=0<br>> betweeness_thresh=0<br>> > > alpha=1.0 beta=1.0 iterations=1 layer=1<br>> > ><br>> > > v.out.svg input=
roads_smooth@user1 output=roads_smooth type=line<br>> > > precision=6 layer=1<br>> > ><br>> > > Both give me svg files without nan's.<br>> > ><br>> > > Can you reproduce this with spearfish data ? Can you look at the
<br>> line<br>> > > with cat=31 in your grass vector (maybe in v.digit) and see if there<br>> is<br>> > > anything abnormal about it ?<br>> > ><br>> > > Moritz<br>> > >
<br>> > ><br>> > ><br>> > ><br>> > > --<br>> > > Groete,<br>> > > Andre Hauptfleisch<br>> > ><br>> > > M: 082 5722 469<br>> > > F: 086 687 1106
<br>> > > E: <a href="mailto:ahaupt@gmail.com">ahaupt@gmail.com</a> <mailto:<a href="mailto:ahaupt@gmail.com">ahaupt@gmail.com</a>><br>> ><br>> ><br>><br>><br>><br>> --<br>> Groete,
<br>> Andre Hauptfleisch<br>><br>> M: 082 5722 469<br>> F: 086 687 1106<br>> E: <a href="mailto:ahaupt@gmail.com">ahaupt@gmail.com</a><br></div></div>> _______________________________________________<br>
> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user
</a><br>><br>><br></blockquote></div><br><br>