I am using python-pdal 2.4.2 to read a LAS 1.4 in PointFormat 8, with the objective or using different writers stages afterwards. The pipeline is simple:
import json
import pdal
filepath = "path/to/file.las"
pipeline = {"pipeline" : [{
"type":"readers.las",
"filename":filepath,
}]}
pipeline = json.dumps(pipeline)
pipeline = pdal.Pipeline(pipeline)
count = pipeline.execute()
But I get the following error:
(readers.las Error) Global encoding WKT flag not set for point format 6 - 10.
Is this a format issue? According to the reader.las doc, pdal supports LAS 1.4. I have troubles understanding what this WKT (Well-Known Text) is about.
I read in the las specifications (see "COORDINATE REFERENCE SYSTEM (CRS) REPRESENTATION" section) that:
GeoTIFF is being replaced by Well Known Text (WKT) as the required Coordinate Reference System (CRS) representation for the new point types (6-10) introduced by LAS 1.4.
So I am guessing the CRS is missing in my LAS file (maybe it is still in GeoTIFF format ?).
I am looking for a way to either:
- Make the pipeline work with the current las data that I have
- Modify the las with LASPY (or another python package) in order to have afterwards a pipeline that starts with a PDAL reader.las.
- Alternatively : read the LAS with
laspy
and then feed it (or thenp.array
) to pdal for subsequent operations.
Does anyone have a clue of what is going on? I am still discovering point cloud formats.