<div dir="ltr">You should be able to divide the values by 256 (right shift 8 bits) in your python script.<div><br></div><div>There is a similar example here: <a href="https://www.pdal.io/stages/filters.programmable.html">https://www.pdal.io/stages/filters.programmable.html</a></div><div><br></div><div>Hope that helps.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 25, 2017 at 4:09 PM, Paul Sung-Pyo Park <span dir="ltr"><<a href="mailto:ppark31@gmail.com" target="_blank">ppark31@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello,<br><br></div>I have been trying to convert a LAS file to PCD using PDAL and have had this error pop up:<br></div>"RuntimeError: Unable to fetch data and convert as requested: Red:uint16_t(50490) -> unsigned char"<br><br>I am very new to PDAL as well as programming in general. Would there be a
simple line I can add to my JSON pipeline file to filter uint16 to
uint8? My current thought is to find a way to divide the input LAS by
65,535 then multiply by 255. However, not sure how I should implement
this with my shallow knowledge. I am currently using Python with JSON inside the script as the pipeline.<br>Thank You.<span class="HOEnZb"><font color="#888888"><div><div><div><br>-- <br><div class="m_-7651570339505157107gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><i><b>Paul Park</b></i><br></div></div></div></div></div></div></span></div></div></div></div></div></div>
</div></div></div></font></span></div>
<br>______________________________<wbr>_________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/pdal</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</div>