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 blank reserved space to the end of the header #152

Open
hobu opened this issue Nov 22, 2024 · 5 comments
Open

Add blank reserved space to the end of the header #152

hobu opened this issue Nov 22, 2024 · 5 comments
Milestone

Comments

@hobu
Copy link
Contributor

hobu commented Nov 22, 2024

1.5 is currently proposing to add three entries to the header – gpstime_offset, gpstime_max, and gpstime_min. We should add reserved space past this so no more future LAS versions change the header size. Additionally:

  • all of the empty space should have 0's written in it
  • the amount of space should bring us to some naturally aligned size
@hobu hobu added this to the v1.5 milestone Nov 22, 2024
@esilvia
Copy link
Member

esilvia commented Dec 17, 2024

Can you elaborate on the benefit of padding an arbitrary amount of space to the end of the header? Any reader can read the Header Size field and respond appropriately, and the existence of VLRs means that the full header will always be variable, by definition.

@hobu
Copy link
Contributor Author

hobu commented Dec 17, 2024

Can you elaborate on the benefit of padding an arbitrary amount of space to the end of the header?

We should add specification-reserved space to the end of the header. Each version we have increased the size of the header. Reserving space would (hopefully) stop us from bumping the size going forward. (I hope there is never a LAS 1.6, but 🤷)

@esilvia
Copy link
Member

esilvia commented Dec 17, 2024

I see what you're saying, but why is changing the header size with minor version changes a problem that needs to be solved?

@abellgithub
Copy link

It may allow for fewer changes to readers and writers of the files with little/no downside.

@esilvia
Copy link
Member

esilvia commented Dec 19, 2024

The recommended approach is to read the header size (2 bytes) from the LAS header at byte offset 94. I think at this point we'll leave it the way it is for LAS 1.x and continue with the current approach. If your reader would like to read a full 1000 or 65535 bytes when parsing the header, there is nothing to stop you.

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