<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body 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="LPlnk">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="LPlnk">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 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);">
Could you help me fix this problem?<br>
<br>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
Regards,</div>
<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);">
- Mathieu Poulin</div>
<div id="Signature">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)"></span></p>
</div>
</div>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Andrew Bell <andrew.bell.ia@gmail.com><br>
<b>Sent:</b> Tuesday, August 31, 2021 9:20 AM<br>
<b>To:</b> Mathieu Poulin <mathieu.poulin@mvtgeosolutions.com><br>
<b>Cc:</b> pdal@lists.osgeo.org <pdal@lists.osgeo.org><br>
<b>Subject:</b> Re: [pdal] libLAS to PDAL, how to write a LAS header from scratch in PDAL?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Mathieu,
<div><br>
</div>
<div>You don't need to do anything. PDAL will write a LAS file with a properly constructed header. You can use options on the LAS writers if you want to alter some of the header field data.</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Aug 31, 2021 at 9:04 AM Mathieu Poulin <<a href="mailto:mathieu.poulin@mvtgeosolutions.com">mathieu.poulin@mvtgeosolutions.com</a>> wrote:<br>
</div>
<blockquote class="x_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)">
Hello everyone,<br>
<br>
I am transitionning to PDAL from libLAS and so far almost everything has been easy to figure out. There is however one thing that I can not find any instructions on how to do, and that is how to write a LAS header in PDAL.<br>
<br>
I've asked the question on Stackoverflow before finding this mailing list, so here is a link to it: <a href="https://stackoverflow.com/questions/68986302/writing-las-header-with-pdal-in-c" id="x_gmail-m_4152221100209582908LPlnk" target="_blank">https://stackoverflow.com/questions/68986302/writing-las-header-with-pdal-in-c</a>.
Hopefully, someone here has the answer that I am looking for.<br>
<br>
Thanks in advance,</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)">
- Mathieu Poulin<br>
<div>
<div id="x_gmail-m_4152221100209582908LPBorder_GTaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMvNjg5ODYzMDIvd3JpdGluZy1sYXMtaGVhZGVyLXdpdGgtcGRhbC1pbi1j" style="width:100%; margin-top:16px; margin-bottom:16px; max-width:800px; min-width:424px">
<table id="x_gmail-m_4152221100209582908LPContainer284556" role="presentation" style="padding:12px 36px 12px 12px; width:100%; border-width:1px; border-style:solid; border-color:rgb(200,200,200); border-radius:2px">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="x_gmail-m_4152221100209582908LPImageContainer284556" style="margin-right:12px; height:160px; overflow:hidden">
<a id="x_gmail-m_4152221100209582908LPImageAnchor284556" href="https://stackoverflow.com/questions/68986302/writing-las-header-with-pdal-in-c" target="_blank"><img id="x_gmail-m_4152221100209582908LPThumbnailImageId284556" alt="" height="160" width="160" style="display:block" src="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded"></a></div>
</td>
<td style="width:100%">
<div id="x_gmail-m_4152221100209582908LPTitle284556" style="font-size:21px; font-weight:300; margin-right:8px; font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px">
<a id="x_gmail-m_4152221100209582908LPUrlAnchor284556" href="https://stackoverflow.com/questions/68986302/writing-las-header-with-pdal-in-c" target="_blank" style="text-decoration:none">Writing LAS header with PDAL in C++ - Stack Overflow</a></div>
<div id="x_gmail-m_4152221100209582908LPDescription284556" style="font-size:14px; max-height:100px; color:rgb(102,102,102); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px; margin-right:8px; overflow:hidden">
I am working on an application that writes LAS files from scratch based on lidar data. Previously, the application was built with LibLAS and it worked quite well. However, LibLAS has been discontin...</div>
<div id="x_gmail-m_4152221100209582908LPMetadata284556" style="font-size:14px; font-weight:400; color:rgb(166,166,166); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif">
<a href="http://stackoverflow.com" target="_blank">stackoverflow.com</a></div>
</td>
</tr>
</tbody>
</table>
<div id="x_gmail-m_4152221100209582908LPCloseButtonContainer284556" title="Remove link preview" role="button">
<i aria-hidden="true" id="x_gmail-m_4152221100209582908LPCloseButton284556"></i></div>
</div>
</div>
</div>
<div>
<div id="x_gmail-m_4152221100209582908Signature">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
<p style="margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)"></span></p>
</div>
</div>
</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><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">Andrew Bell<br>
<a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</div>
</body>
</html>