- class laspy.laswriter.LasWriter(dest: BinaryIO, header: LasHeader, do_compress: Optional[bool] = None, laz_backend: Optional[Union[LazBackend, Iterable[LazBackend]]] = None, closefd: bool = True, encoding_errors: str = 'strict')
Allows to write a complete LAS/LAZ file to the destination.
- __init__(dest: BinaryIO, header: LasHeader, do_compress: Optional[bool] = None, laz_backend: Optional[Union[LazBackend, Iterable[LazBackend]]] = None, closefd: bool = True, encoding_errors: str = 'strict') None
dest (file_object) – file object where the LAS/LAZ will be written
header (LasHeader) – The header of the file to be written
do_compress (bool, optional) – Whether the file data should be written as LAS (uncompressed) or LAZ (compressed). If None, the file won’t be compressed, unless a laz_backend is provided
laz_backend (LazBackend or list of LazBackend, optional) – The LazBackend to use (or if it is a sequence the LazBackend to try) for the compression
closefd (bool, default True) – should the dest be closed when the writer is closed
encoding_errors (str, default 'strict') – How encoding errors should be treated. Possible values and their explanation can be seen here: https://docs.python.org/3/library/codecs.html#error-handlers.
- write_points(points: PackedPointRecord) None
If you are writing points coming from multiple different input files into one output file, you have to make sure the point record you write all use the same scales and offset of the writer.
- write_evlrs(evlrs: VLRList) None
Writes the EVLRs to the file