<div dir="ltr">Tom,<div><br><div>Glad to see that you found a solution/workaround as posted to SO.</div></div><div><br></div><div>I do believe that we need to add some functionality to the filter to do the flipping. It's easy math, just need to work out the details of how to expose this to users. I'll create a ticket for this on GitHub.</div><div><br></div><div>Brad</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 3, 2017 at 3:39 AM Tom van Tilburg <<a href="mailto:tom.van.tilburg@gmail.com">tom.van.tilburg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>This question is also on stackexchange: <a href="https://gis.stackexchange.com/questions/250810/erratic-results-from-filters-normal-in-pdal" target="_blank">https://gis.stackexchange.com/questions/250810/erratic-results-from-filters-normal-in-pdal</a></div><div>---</div><div><br></div><div>Given this roof structure: <br></div><div><br></div><div><img src="https://i.stack.imgur.com/t6YiO.jpg" alt="roofpointcloud"><br></div><div><br></div><div><div>I get the following output for the normalx, after using</div><div><br></div><div><div>    {</div><div>      "type":"filters.range",</div><div>      "limits":"Classification[6:6],ReturnNumber[1:1]"</div><div>    },</div><div>    {</div><div>        "type":"filters.eigenvalues",</div><div>        "knn":8</div><div>    },</div><div>     {</div><div>         "type":"filters.normal",</div><div>         "knn":8</div><div>     },</div></div></div><div><br></div><div><img src="https://i.stack.imgur.com/oaliN.jpg" alt="point normalx"><br></div><div><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;background-color:rgba(248,248,248,0.6)">(orange to purple : -1 to 1)</span><br></div><div><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;background-color:rgba(248,248,248,0.6)"><br></span></div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)">Comparable situation for normaly and normalz</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)">Where I was expecting homogeneous colored roofplanes, I get a mixed-up situation, where the values appear to be sometimes flipped to the negative.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)">It seems to me there are some artifacts here based on the laser scan-line, considering the flipping of the normal on the same roof plane.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)">I cannot wrap my head around what happens here. Anybody ideas? The purpose of this work is to get the slope and aspect from the roofplanes. I can get the slope correct by taking the absolute values of normalz (slope will never pass the 90 degrees) but this is not an option for calculating the aspect it seems. The resulting pointset can be downloaded <a href="http://research.geodan.nl/sites/tomt/output.las" rel="nofollow noreferrer" style="font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(53,141,170);text-decoration-line:none" target="_blank">here</a></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)">Best,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseline;clear:both;color:rgb(36,39,41);background-color:rgba(248,248,248,0.6)"> Tom</p></div></div>
_______________________________________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/pdal</a></blockquote></div>