def read(self):
vlrs = self.read_vlrs()<EOL>self._warn_if_not_at_expected_pos(<EOL>self.header.offset_to_point_data, "<STR_LIT>", "<STR_LIT>"<EOL>)<EOL>self.stream.seek(self.start_pos + self.header.offset_to_point_data)<EOL>try:<EOL><INDENT>points = self._read_points(vlrs)<EOL><DEDENT>except (RuntimeError, errors.LazPerfNotFound) as e:<EOL><INDENT>logger.error("<STR_LIT>".format(e))<EOL>self.stream.seek(self.start_pos)<EOL>self.__init__(io.BytesIO(laszip_decompress(self.stream)))<EOL>return self.read()<EOL><DEDENT>if points.point_format.has_waveform_packet:<EOL><INDENT>self.stream.seek(<EOL>self.start_pos + self.header.start_of_waveform_data_packet_record<EOL>)<EOL>if self.header.global_encoding.are_waveform_flag_equal():<EOL><INDENT>raise errors.PylasError(<EOL>"<STR_LIT>".format(<EOL>"<STR_LIT>"<EOL>if self.header.global_encoding.waveform_internal<EOL>else "<STR_LIT>"<EOL>)<EOL>)<EOL><DEDENT>if self.header.global_encoding.waveform_internal:<EOL><INDENT>_, _ = self._read_internal_waveform_packet()<EOL><DEDENT>elif self.header.global_encoding.waveform_external:<EOL><INDENT>logger.info(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>if self.header.version >= "<STR_LIT>":<EOL><INDENT>evlrs = self.read_evlrs()<EOL>return las14.LasData(<EOL>header=self.header, vlrs=vlrs, points=points, evlrs=evlrs<EOL>)<EOL><DEDENT>return las12.LasData(header=self.header, vlrs=vlrs, points=points)<EOL>
Reads the whole las data (header, vlrs ,points, etc) and returns a LasData
        object