<div dir="ltr"><div><div><div><div>Andrew,<br><br></div>Writing to LAS 1.4 format did the trick! I had been specifying the "extra_dims" option in the "writers.las" stage, so I'm not clear as to why it wasn't working. But I will continue to use version 1.4 as backwards compatibility is not an issue.<br><br></div>Thanks for the quick reply.<br><br></div>Regards,<br></div>Eric<br><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 14, 2018 at 9:42 AM, Andrew Bell <span dir="ltr"><<a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@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">Eric,<div><br></div><div>If you write version 1.2 LAS, the information about the extra bytes isn't read by default.  You have to tell the PDAL las reader what's in the extra bytes of each record.  You can do this with the option --readers.las.extra_dims.  If you're using PDAL 1.7, there's a new option, --readers.las.use_eb_vlr that will read the extra bytes VLR that PDAL writes (PDAL always writes the extra bytes VLR if there are extra bytes, even in pre-1.4 LAS files).  LAS files before version 1.4 may have extra bytes written that don't have the VLR to define them, which is why the extra_dims option is necessary.  You can also simply write the file with version 1.4 LAS by specifying --writers.las.<wbr>minor_version=4.</div><div><br></div><div>I've tested filters.ferry and it seems to work fine in your scenario.  If you're not familiar with the details of LAS, it's sometimes easier to write text output to verify that things are working as expected.</div><div><br></div><div>Hope that helps,</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Sat, Apr 14, 2018 at 9:59 AM, Eric Robeck <span dir="ltr"><<a href="mailto:erobeck@gmail.com" target="_blank">erobeck@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><div>Andrew,<br><br></div>Thanks for your suggestion! I looked up the LAS Writer specification and used "extra_dims" to specify the additional fields created by the ferry filter and their types, as shown below. However, the dimensions are never added to the output file. I have tried using "extra_dims":"all" but with no luck. Are there parameters in addition to "extra_dims" that I need to specify? VLRs? The JSON pipeline I am using is copied below.<br><br></div>I assumed that the extra DTM field wasn't being created, since it was not shown in the schema, statistcs, or point values accessed through 'pdal info' and because ferrying a new field didn't change the output file size.<br><br></div><div>Per Howard's recommendation yesterday, I updated PDAL to 1.7.1 but I continue to get the same results.<br><br></div><div>I will share this with the PDAL mailing group, but wanted to reply to you directly first. I appreciate your help.<br></div><div><br></div><div>Thanks,<br></div><div>Eric<br><br><br><span style="font-family:monospace,monospace">{<br>  "pipeline":<br>  [<br>    "C:/data/forest_park/forest_pa<wbr>rk_UTM_cropped.laz",<br>    {<br>      "type":"filters.ferry",<br>      "dimensions":"Classification=><wbr>OldClassification, =>DTM"<br>    },<br>    {<br>      "type":"filters.colorization",<br>      "dimensions":"DTM:1:1.0",<br>      "raster":"C:/data/forest_park/<wbr>dtm/w001001.adf"<br>    },<br>    {<br>      "type":"writers.las",<br>      "compression":"true",<br>      "extra_dims":"OldClassificatio<wbr>n=uint8, DTM=float",<br>      "scale_x":"0.01",<br>      "scale_y":"0.01",<br>      "scale_z":"0.01",<br>      "offset_x":"auto",<br>      "offset_y":"auto",<br>      "offset_z":"auto",<br>      "filename":"C:/data/forest_par<wbr>k/forest_park_orig_dtm.laz"<br>    }<br>  ]<br>}<br></span></div><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 13, 2018 at 6:09 AM, Andrew Bell <span dir="ltr"><<a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@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="auto"><div>Hi Eric,</div><div dir="auto"><br></div><div dir="auto">How do you know that the DTM field is not getting created? You'll have to change the writer to put this field in LAS extra bytes if you want it to be part of your output. See the option 'extra_dims' at <a href="https://www.pdal.io/stages/writers.las.html" target="_blank">https://www.pdal.io/stages/<wbr>writers.las.html</a> for more info.<br><br><div class="gmail_quote" dir="auto"><div><div class="m_-8209838463433484252m_5636796456445841087h5"><div dir="ltr">On Fri, Apr 13, 2018, 12:05 AM Eric Robeck <<a href="mailto:erobeck@gmail.com" target="_blank">erobeck@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-8209838463433484252m_5636796456445841087h5"><div dir="ltr"><div><div>Hello,<br><br></div>I have written a PDAL pipeline to perform the following steps:<br><br>1.) Ferry the existing Classification to the UserData field for storage (this is more efficient than creating a new field)<br></div><div>2.) Use the ferry filter to create a new DTM field<br></div><div>3.) Use the colorize filter to extract the elevation value from a single-band TIF (a DTM made from the original ground points)<br></div><div>4.) Run SMRF to reclassify the ground points<br></div><div><br>I cannot get the ferry filter to work at all. It won't transfer values between existing columns or create new columns, despite using the same syntax described on PDAL.io. 
I have tried various ways to get around this issue. Changing the order 
of filters.ferry in the pipeline didn't make a difference. I saw that 
the online examples worked on uncompressed LAS files, so I converted the
 input files from LAZ to LAS but there was no change. The pipeline completes without errors, but info --stats and info --schema show that the ferried fields were not created or updated.<br>

<br>The colorize filter works fine, as long as I use an existing field. For example, 
"dimensions":"Red:1:1000.0" works by mapping the elevation values to the Red field and multiplying by 1000 to preserve millimeter precision in an integer field. However, 
"dimensions":"DTM:1:1000.0"

does not, because the ferry filter doesn't create the DTM field. The SMRF filter also works well, but without the ability to ferry values I lose the original classifications.<br></div><div><br></div><div>I am using PDAL 1.6.0 on Windows within OSGeo4W. It was installed this month. My pipeline is copied below.<br><br></div><div>Any help would be greatly appreciated.<br><br></div><div>Thanks,<br></div><div>Eric<br><span style="font-family:monospace,monospace"><br><br>{<br>  "pipeline":<br>  [<br>    "C:/data/forest_park/filtered/<wbr>forest_park_orig.laz",<br>    {<br>      "type":"filters.ferry",<br>      "dimensions":"Classification=><wbr>UserData, =>DTM"<br>    },<br>    {<br>      "type":"filters.colorization",<br>      "dimensions":"DTM:1:1000.0",<br>      "raster":"C:/data/forest_park/<wbr>dtm/w001001.adf"<br>    },<br>    {<br>      "type":"filters.smrf",<br>      "cell":1.00,<br>      "cut":0,<br>      "scalar":1.25,<br>      "slope":0.00,<br>      "threshold":0.50,<br>      "window":10<br>    },<br>    {<br>      "type":"writers.las",<br>      "tag":"writerslas",<br>      "compression":"true",<br>      "scale_x":"0.01",<br>      "scale_y":"0.01",<br>      "scale_z":"0.01",<br>      "offset_x":"auto",<br>      "offset_y":"auto",<br>      "offset_z":"auto",<br>      "filename":"C:/data/forest_par<wbr>k/forest_park_orig_dtm.laz"<br>    }<br>  ]<br>}</span><br></div></div></div></div>
______________________________<wbr>_________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org" rel="noreferrer" target="_blank">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/pdal</a></blockquote></div></div></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-8209838463433484252gmail_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>
</font></span></div>
</blockquote></div><br></div></div>