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

Commit

Permalink
fix offset to first evlr
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Mar 9, 2020
1 parent ecb52b3 commit 84a4484
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pylas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.1"
__version__ = "0.4.2"

from . import errors, vlrs
from .headers import HeaderFactory
Expand Down
4 changes: 3 additions & 1 deletion pylas/lasdatas/las14.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .. import evlrs
from ..headers.rawheader import RawHeader1_4
from ..utils import ctypes_max_limit
from ..vlrs import vlrlist


class LasData(LasBase):
Expand Down Expand Up @@ -34,7 +35,8 @@ def write_to(self, out_stream, do_compress=False):
if not do_compress:
if len(self.evlrs) > 0:
self.header.number_of_evlr = len(self.evlrs)
self.header.start_of_first_evlr = self.header.point_size * self.header.point_count
raw_vlrs = vlrlist.RawVLRList.from_list(self.vlrs)
self.header.start_of_first_evlr = (self.header.point_size * self.header.point_count) + self.header.size + raw_vlrs.total_size_in_bytes()

super().write_to(out_stream, do_compress=do_compress)
if len(self.evlrs) > 0:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="pylas",
version="0.4.1",
version="0.4.2",
description="Las/Laz reading and writing in python",
long_description=readme,
url="https://github.com/tmontaigu/pylas",
Expand Down

0 comments on commit 84a4484

Please sign in to comment.