1

i'm struggling to execute pdal inside a jupyter python notebook.

import pdal
polygon_draw_bounds = polygon_draw.bounds
cropper = {
    "pipeline": [str(datasource/file),
        {   "type":"filters.crop",
            'bounds':str(([polygon_draw_bounds[0], polygon_draw_bounds[2]],[polygon_draw_bounds[1], polygon_draw_bounds[3]]))},
        {   "type":"filters.crop",
            'polygon':polygon_draw.wkt},
        {   "type":"filters.eigenvalues",
            "knn":16},
        {   "type":"filters.normal",
            "knn":16}
    ]}
pipeline = pdal.Pipeline(json.dumps(cropper))
pipeline.validate()
%time n_points = pipeline.execute()

print('Pipeline selected {} points ({:.1f} pts/m2)'.format(n_points, n_points/polygon_draw.area))

pipeline.validate() raise an error. If i remove this line, pipeline.execute() work like a charm but i don't no why.

Marc
  • 65
  • 7

1 Answers1

1

validate() was deprecated at least since November 2021 and has been removed from the python-pdal package. See this issue in the official GitHub repo #106.

psalt
  • 384
  • 2
  • 9