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

Scaling of X,Y,Z not written to ept.json #7

Closed
wonder-sk opened this issue Nov 6, 2020 · 3 comments
Closed

Scaling of X,Y,Z not written to ept.json #7

wonder-sk opened this issue Nov 6, 2020 · 3 comments

Comments

@wonder-sk
Copy link
Contributor

In EPT decoder we read offset+scale from ept.json, but bu does not write scaling information to the ept.json:

	{"name": "X", "type": "floating", "size": 8 },
	{"name": "Y", "type": "floating", "size": 8 },
	{"name": "Z", "type": "floating", "size": 8 },

When I edited the ept.json to include scaling, the decoder/renderer started to work:

	{"name": "X", "type": "float", "size": 8, "scale": 0.01 },
	{"name": "Y", "type": "float", "size": 8, "scale": 0.01 },
	{"name": "Z", "type": "float", "size": 8, "scale": 0.01 },

What is the precedence of scaling/offset information: shall we trust whatever is written in the LAS/LAZ file (and ignore ept.json) or prefer what is stored in ept.json?

A related question is whether ept.json should report X/Y/Z as doubles or as ints (given that's how they are actually stored in LAZ)

@abellgithub
Copy link
Collaborator

@hobu? @connormanning?

I was under the impression that scale/offset only applied to dimensions other than X/Y/Z.

@connormanning
Copy link
Collaborator

Scale/offset applies to XYZ as well, otherwise binary/zstandard/other future generic encodings would not work. LAZ, although the default due to its compression ratio, is kind of the odd one out in that it is re-specified in the encoding itself.

So for LAZ data, the schema should show the scale/offset and advertise their values as int32 values.

@abellgithub
Copy link
Collaborator

Fixed by 3fbfc9f

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