Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to write PDAL's entire JSON metadata tree to LAS VLR(s) #1509

Closed
hobu opened this issue Mar 2, 2017 · 14 comments
Closed

Add an option to write PDAL's entire JSON metadata tree to LAS VLR(s) #1509

hobu opened this issue Mar 2, 2017 · 14 comments
Milestone

Comments

@hobu
Copy link
Member

hobu commented Mar 2, 2017

There are situations where it would be helpful to be able to track how a file was created in a more detailed way than simply the software_id and system_id in an LAS file.

I would like to add a pdal_metadata option to writers.las that writes a JSON metadata object serialization of the PDAL metadata into a VLR (has to fit in 64k) or EVLR. pdal info can simply barf this back to users as raw JSON because it knows how to interpret it.

@kbevers
Copy link
Contributor

kbevers commented Mar 2, 2017

I like this. What would be included in this JSON metadata? The generating pipeline? Version of PDAL?

@hobu
Copy link
Member Author

hobu commented Mar 2, 2017

What would be included in this JSON metadata? The generating pipeline? Version of PDAL?

Yes, the equivalent of pdal info --metadata along with all per-stage metadata of the pipeline.

@msmitherdc
Copy link
Contributor

Is connection info part of the per stage metadata? If so, that would have to be removed

@hobu
Copy link
Member Author

hobu commented Mar 2, 2017

Is connection info part of the per stage metadata?

Yes.

If so, that would have to be removed

Maybe we will need a way to hide sensitive entries then.

@kbevers
Copy link
Contributor

kbevers commented Mar 2, 2017

Yes, the equivalent of pdal info --metadata along with all per-stage metadata of the pipeline.

Only the stuff that is not already in the LAS file, right?

@hobu
Copy link
Member Author

hobu commented Mar 2, 2017

Only the stuff that is not already in the LAS file, right?

My default implementation will just copy it all in. Seems like extra work to keep it out, and maybe there's a discrepancy and you care about that later down the line :)

@msmitherdc
Copy link
Contributor

i would agree on keeping in all metadata even if redundant

@kbevers
Copy link
Contributor

kbevers commented Mar 2, 2017

I can't see the point of repeating information. As far as I can see the only thing from the pdal info --metadata output that is not already in the file is the version number of PDAL. Other metadata, like the pipeline, I find interesting though. Just my two cents :)

@hobu
Copy link
Member Author

hobu commented Mar 2, 2017

What if the pipeline that created it is a merge of a bunch of files? One can imagine a number of scenarios where you sometimes do and sometimes don't want everything. Much simpler to not care 😄

@kbevers
Copy link
Contributor

kbevers commented Mar 2, 2017

That's a valid point. I hadn't considered that. You'll probably run into the 64kb limit quite easily though!

@hobu
Copy link
Member Author

hobu commented Mar 2, 2017

You'll probably run into the 64kb limit quite easily

Yes. We can split stuff and cat them together or write an EVLR. I'm not sure what to do.

@kbevers
Copy link
Contributor

kbevers commented Mar 2, 2017

You could just write a VLR with info for each parent file that is used to create the file in question. That would be easy and very generic in terms of implementation.

@hobu
Copy link
Member Author

hobu commented Mar 2, 2017

a VLR with info for each parent file

They can nest in arbitrary ways. It will be better to just dump it as is, and then if anyone needs to go back through 1000s of files to figure something out, they can write a little program or regex to pluck out what they need.

@hobu
Copy link
Member Author

hobu commented Mar 14, 2017

Implemented in #1525

@hobu hobu closed this as completed Mar 14, 2017
@hobu hobu added this to the 1.5 milestone Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants