[pdal] Request for Kind Assistance with the fusion of awk and pcd

James Klassen klassen.js at gmail.com
Thu Sep 5 05:38:48 PDT 2019


You need to choose if you are doing the filtering external or internal to
pdal.

You could use awk to filter the points, but you would need to have awk read
the original file and write a temporary file for pdal to read.  You need to
be careful that this modified temporary file is still valid according to
the pcd file format.  I'm not deeply familiar with the pcd format, so I
don't know how difficult this would be.  For example, many formats have a
field storing the number of points that would need to also be updated for
the file to be consistent.  Awk is likely powerful enough to handle this,
but it won't be a simple one line command.

However, like someone mentioned recently on this list, filtering the points
within pdal is probably the easiest and fastest option.  Example 2 in the
pdal translate documentation illustrates how to do this using
filters.range.  (Just leave out the bits about voxelcenters and smrf).

https://pdal.io/apps/translate.html#example-2

e.g.

pdal translate input.pcd output.csv range \
    --filters.range.limits="X![0:0]"






On Wed, Sep 4, 2019, 20:03 Ashikur Rahman <ashikurrahman2009 at gmail.com>
wrote:

> Hi,
>
> Is it possible to run the awk and pcd translate command in the same loop
> in bash ?
>
> I am trying to remove the rows where my first column contains a value of
> zero and they converting those files into csv file with the following
> command
>
> for file in *.pcd
> > do
> > awk '$1!=0'
> > pdal translate $file $(file%.pcd).csv
> > done
>
> Can anyone please help me whether this kind of command works in the pdal
> environment ?
>
> Thanks
> Ashik
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pdal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20190905/68f7a4ab/attachment.html>


More information about the pdal mailing list