[pdal] assign a constant class to las imported fra tiff

Andrew Bell andrew.bell.ia at gmail.com
Wed Oct 4 05:02:27 PDT 2017


On Wed, Oct 4, 2017 at 7:45 AM, Andrew Flatman <anfla at sdfe.dk> wrote:

> Hi guys,
>
> Both good ideas, my problem is if I set it to:    "dimensions":
> "band-1=Z, band-2=Classification"
>
> I get: PDAL: filters.ferry: Can't ferry dimension 'band-2'. Dimension
> doesn't exist.
>
>
>
> If I set it to: "dimensions": "band-1=Z, band-1=Classification"
>
> Then no elevations are passed to the LAS file, only classes.
>

This is in my mind a bug in filters.ferry.  There's no reason for it not to
create multiple desitnation dimensions from a source dimension, or to
create one from nothing.

I'll fix this shortly.

P.S. - Although it's kludgy, you can create a dimension by reading in a
text file in addition to your tiff file.  Just create a text file that has
nothing in it but a header line.  You can stick whatever dimensions you
want in there.  In your case, the file can just contain the text
"Classification".  So your pipeline would look like:

{

    "pipeline":[

        "test.txt",

        {

            "type": "readers.gdal",

            "filename":"in.tif"

        },

        {

            "type": "filters.assign",

            "assignment" : "Classification[:]=2"

        },

        {

            "type": "writers.las",

            "filename": "out.las"

        }

    ]
}

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20171004/75a29eb0/attachment-0001.html>


More information about the pdal mailing list