Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Commit

Permalink
remove exrtabytes check in compress_with_laszip
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Mar 9, 2020
1 parent ba75cfc commit 90997b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pylas/lasdatas/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,6 @@ def write(self, destination, do_compress=None):
self.write_to(destination, do_compress=do_compress)

def _compress_with_laszip_executable(self, out_stream):
if self.vlrs.get("ExtraBytesVlr"):
raise errors.LazError("Compressing LAS that has extra bytes is not supported with LASzip")
try:
out_stream.fileno()
except OSError:
Expand Down
5 changes: 5 additions & 0 deletions pylas/lasdatas/las14.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ def write_to(self, out_stream, do_compress=False):
start = out_stream.tell()
super().write_to(out_stream, do_compress=do_compress)

# when do_compress=True, and that the method to compress
# is piping data through laszip we will write evlrs 2 times
# once when we write the data (with do_compress=False)
# to laszip stdin and the other time after the data laszip returned us
# it's a bit a bit strange but should do no harm
raw_evlrs = evlrs.RawEVLRList.from_list(self.evlrs)
if len(self.evlrs) > 0:
self.header.start_of_first_evlr = out_stream.tell()
Expand Down

0 comments on commit 90997b6

Please sign in to comment.