<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 2, 2021 at 10:48 AM Mathieu Poulin <<a href="mailto:mathieu.poulin@mvtgeosolutions.com">mathieu.poulin@mvtgeosolutions.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Andrew,<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
Using options does seem to work but there is one thing I cannot find in the documentation and that is the min and max bounds. Previously, I used the header SetMin and SetMax functions. I have tried setting options for "min_x", "max_x", etc., I also tried the
"bounds" option and tried to pass a BOX3D object to it and then a string with the correct format described here: <a href="https://pdal.io/stages/filters.crop.html#options" id="gmail-m_-6737104613822515559LPlnk" target="_blank">https://pdal.io/stages/filters.crop.html#options</a>, but nothing seems to
work, I keep getting an error saying something along the lines of "unexpected argument".</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The reason I am trying to do this is because I am getting an error that says: writers.las: Unable to convert scaled value (2.307896276e+12) to in32 for dimension 'X'. I found that the error is mentioned in the FAQ: <a href="https://pdal.io/faq.html" id="gmail-m_-6737104613822515559LPlnk" target="_blank">https://pdal.io/faq.html</a>.
The thing is, I never had problems with positions fitting into a 32-bit integer before I switched to PDAL. I assume this is because I have not set my bounds properly, but I can't really be certain, it could also be that the scale or offset work differently
in PDAL.</div></div></blockquote><div><br></div><div>PDAL automatically sets the bounds for the data. You don't need to do anything. You're getting the error because your data, when transformed according to the scale/offset, doesn't fit in a 32-bit integer. I'm not sure why you were able to write your data using the other library -- perhaps the data wasn't being written properly or was invalid in some cases? You should reduce the precision or set the offset in order to write valid data. Take note of the defaults used for scale_<x/y/z> and offset<x/y/z> and set them for your data or use the option forward="scale,offset" if you want the output file to have the same scale/offset as the input file (assuming there's just one input file).<br><br>min_x and max_x are only applicable to the crop filter and not the LAS writer.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div></div>