Skip to content

Fix bug in pc_patch_uncompressed_from_lazperf#215

Merged
elemoine merged 5 commits intopgpointcloud:masterfrom
elemoine:ele_lazperf-datasize
Jun 12, 2018
Merged

Fix bug in pc_patch_uncompressed_from_lazperf#215
elemoine merged 5 commits intopgpointcloud:masterfrom
elemoine:ele_lazperf-datasize

Conversation

@elemoine
Copy link
Copy Markdown
Contributor

There is a major bug in pc_patch_uncompressed_from_lazperf preventing PC_Uncompress from working on LAZ-compressed patches.

This is what we currently get when calling PC_Uncompress on a LAZ-compressed patch:

lopocs=# select pc_uncompress(points) from inrap where id=1;
ERROR:  pc_patch_uncompressed_deserialize: calculated patch data sizes don't match (0 != 16000)

The bug is that pc_patch_uncompressed_from_lazperf doesn't set datasize on the uncompressed patch. This PR fixes it.

Éric Lemoine added 2 commits June 11, 2018 21:50
pc_patch_uncompressed_from_lazperf needs to set patch->datasize.
@elemoine
Copy link
Copy Markdown
Contributor Author

I suggest to create a v1.1.1 release when this is merged.

@pblottiere
Copy link
Copy Markdown
Member

@elemoine Do you think that we could add a unit test covering this issue?

I suggest to create a v1.1.1 release when this is merged.

👍

@elemoine
Copy link
Copy Markdown
Contributor Author

elemoine commented Jun 12, 2018

@elemoine Do you think that we could add a unit test covering this issue?

Good call! I extended one of the existing lazperf unit tests, and I added a SELECT PC_Uncompress query to the lazperf SQL tests.

@pblottiere
Copy link
Copy Markdown
Member

I extended one of the existing lazperf unit tests, and I added a SELECT PC_Uncompress query to the lazperf SQL tests.

It's perfect, thanks @elemoine!

@elemoine elemoine merged commit 00f9660 into pgpointcloud:master Jun 12, 2018
@elemoine elemoine deleted the ele_lazperf-datasize branch June 12, 2018 07:17
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

Successfully merging this pull request may close these issues.

2 participants