[pdal] Progress bar

Howard Butler howard at hobu.co
Mon Nov 7 06:57:57 PST 2022



> On Nov 7, 2022, at 8:50 AM, Micha Silver <tsvibar at gmail.com> wrote:
> 
> When running a pdal pipeline in python, is there a way to display a progress bar?
> 
> 
> If I have:
> 
> pipeline = pdal.Pipeline([stage1, stage2, ....])
> 
> 
> Can I do something like:
> count = tqdm(pipeline.execute())

Progress reporting is hard. At least as hard as naming things or caching.

For granular progress output, there's really only one option right now, and it works only if your pipeline is streamable. Use execute_streaming() with a chunk size for pipelines that are .streamable. You will have to do your own progress math.

I suppose we could expose the stage completion signals to the Python bindings, but that isn't going to be particularly granular because some stages are done in an instance and others take the rest of the 99% of the time, depending on how the pipeline is configured. 

Another option would be to use the log-timing output as some kind of heuristic to estimate completeness at a point in time. That isn't exposed to the Python bindings at this time either, however.

Howard


More information about the pdal mailing list