-
Notifications
You must be signed in to change notification settings - Fork 485
Description
Convenient filenames
If you are using PDAL in some kind of spray-n-pray scenario, filename management isn't really your concern. They just need to be unique, relevant to the driver, and reflected in the pipeline's metadata out the other end so you can maybe do something with it further down the line.
I propose to add uuid as a special filename for any Writer that has registered writerExtensions in StageExtensions. The extension used for the file will be the FIRST available extension in the writerExtensions struct. The user MUST provide uuid as the filename (filename is a required option for every writer, and I don't think we should relax that behavior).
{
"type":"writers.copc"
"filename":"uuid"
}
--pipeline-serialization output
The UUID would then be reflected in the metadata serialization if a downstream application needed it (as opposed to watching a directory for changes or something not so convenient).
pdal pipeline ./test/data/pipeline/splitter.json --pipeline-serialization stdout
{
"pipeline":
[
{
"filename": "/Users/hobu/dev/git/pdal/test/data/las/1.2-with-color.las",
"tag": "readers_las1",
"type": "readers.las"
},
{
"inputs":
[
"readers_las1"
],
"length": "100",
"tag": "filters_splitter1",
"type": "filters.splitter"
},
{
"filename": "46d2b6f1-94cb-4ca8-bf60-95f41c000b20.las",
"inputs":
[
"filters_splitter1"
],
"tag": "writers_las1",
"type": "writers.las"
}
]
}