[pdal] assign a constant class to las imported fra tiff
Andrew Flatman
anfla at sdfe.dk
Wed Oct 4 04:45:32 PDT 2017
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.
/Andrew
Fra: pdal [mailto:pdal-bounces at lists.osgeo.org] På vegne af Kristian Evers
Sendt: 4. oktober 2017 13:20
Til: 'pdal at lists.osgeo.org' <pdal at lists.osgeo.org>
Emne: Re: [pdal] assign a constant class to las imported fra tiff
Hi Andrew,
Try this:
{
"pipeline":[
{
"type": "readers.gdal",
"filename":"in.tif"
},
{
"type": "filters.ferry",
"dimensions": "band-1=Z, band-1=Classification"
},
{
"type": "filters.assign",
"assignment" : "Classification[:]=2"
},
{
"type": "writers.las",
"filename": "out.las"
}
]
}
The problem with your first try is that "2" is not a known dimension to PDAL. In the second try you haven't yet created a "Classification" dimension. In the above pipeline I start by creating the Classification dimension with scratch data from the first raster band. Afterwards I overwrite the data in Classification an assign 2 to all points.
/Kristian
Fra: pdal [mailto:pdal-bounces at lists.osgeo.org] På vegne af Andrew Flatman
Sendt: 4. oktober 2017 12:55
Til: 'pdal at lists.osgeo.org' <pdal at lists.osgeo.org<mailto:pdal at lists.osgeo.org>>
Emne: [pdal] assign a constant class to las imported fra tiff
Hi,
I am reading a DEM from a tiff file and writing it as las. My problem is that I cannot set the class. I have tried adding the dimension Classification in the filter.ferry part:
{
"type": "filters.ferry",
"dimensions": "band-1=Z, 2=Classification"
},
Which gives the error: PDAL: filters.ferry: Can't ferry dimension '2'. Dimension doesn't exist.
I have tried this: "dimensions": "band-1=Z, Classification[:]=2"
Which gives the error: PDAL: filters.ferry: Can't ferry dimension 'Classification[:]'. Dimension doesn't exist.
I have also tried assigning the classification using the filter.assign:
{
"type":"filters.assign",
"assignment" : "Classification[:]=2"
},
Which gives the error: PDAL: filters.assign: Invalid dimension name in 'values' option: 'Classification'.
Any Ideas as to how I can set all the values to specific class?
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20171004/d1f729ef/attachment.html>
More information about the pdal
mailing list