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

Commit

Permalink
create_from_header: reset point count to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Sep 13, 2018
1 parent 1c5bb89 commit c292fbd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pylas/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ def create_from_header(header):
pylas.lasdatas.base.LasBase
"""
header = copy.copy(header)
points = record.PackedPointRecord.zeros(
PointFormat(header.point_format_id), header.point_count
)
header.point_count = 0
points = record.PackedPointRecord.empty(PointFormat(header.point_format_id))
if header.version >= "1.4":
return las14.LasData(header=header, points=points)
return las12.LasData(header=header, points=points)
Expand Down

0 comments on commit c292fbd

Please sign in to comment.