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

Commit

Permalink
Version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Jul 12, 2018
1 parent f058c37 commit 5b406ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pylas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
__version__ = '0.2.0'

from . import errors
from .headers import HeaderFactory
from .lib import convert, create_from_header
from .lib import create_las as create
from .lib import mmap_las as mmap
from .lib import open_las as open
from .lib import read_las as read
from .lib import mmap_las as mmap
from .point.dims import supported_point_formats, lost_dimensions
2 changes: 2 additions & 0 deletions pylas/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
def raise_if_no_lazperf():
if not HAS_LAZPERF:
raise LazPerfNotFound("Cannot manipulate laz data")
elif lazperf.__version__ < '1.3.0':
raise LazPerfNotFound("Version >= 1.3.0 required, you have {}".format(lazperf.__version__))


def is_point_format_compressed(point_format_id):
Expand Down
4 changes: 3 additions & 1 deletion pylas/lasmmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

from . import lasreader

WHOLE_FILE = 0


class LasMMAP(base.LasBase):
""" Memory map a LAS file.
Expand All @@ -27,7 +29,7 @@ def __init__(self, filename):
fileref = open(filename, mode="r+b")
lasreader._raise_if_wrong_file_signature(fileref)

m = mmap.mmap(fileref.fileno(), length=0, access=mmap.ACCESS_WRITE)
m = mmap.mmap(fileref.fileno(), length=WHOLE_FILE, access=mmap.ACCESS_WRITE)
header = headers.HeaderFactory.from_mmap(m)
if header.are_points_compressed:
raise ValueError("Cannot mmap a compressed LAZ file")
Expand Down
3 changes: 2 additions & 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.1.5",
version="0.2.0",
description="Las/Laz reading and writing in python",
long_description=readme,
url="https://github.com/tmontaigu/pylas",
Expand All @@ -18,3 +18,4 @@
packages=find_packages(exclude=("pylastests",)),
zip_safe=False,
)

0 comments on commit 5b406ba

Please sign in to comment.