Closed wonder-sk closed 1 year ago
I think this is a bug. If I use a pipeline with additional stages, the .schema
member is populated correctly.
The reason this is not working is because the PipelineExecutor maintains its own streaming PointTable that cannot provide its metadata during the .metadata()
call. Only the standard mode PointTable is available for that.
I think the PipelineExecutor should be split in two – one for streaming and one for standard mode.
Not sure if this is an instance of the same problem or a separate issue:
import pdal
p = pdal.Reader("data.laz") | pdal.Filter.hexbin()
for x in p.iterator(chunk_size=100000):
print("hello")
print(p.metadata)
The last line gives me RuntimeError: Pipeline has not been executed!
definitely related and in the python bindings usage of streaming vs notstreaming
PipelineIterator
has extra properties, including metadata
; there's a test for it. So the example above should be (untested):
import pdal
p = pdal.Reader("data.laz") | pdal.Filter.hexbin()
it = p.iterator(chunk_size=100000)
for x in it:
print("hello")
print(it.metadata)
ok, not a bug and not going to do anything about it. If you're in streaming mode, you need to get your metadata from the iterator, not the pipeline.
If I execute pipeline in streaming mode, the schema dictionary ends up empty. When executed in standard mode, it is properly populated.