def set_dataformatid(self, value):
        if value not in range(6):
            raise LaspyHeaderException("Format ID must be 3, 2, 1, or 0")
        if not self.file_mode in ("w", "w+"):
            raise LaspyHeaderException("Point Format ID can only be set for " + 
                                        "files in write or append mode.")
        if self.writer.get_pointrecordscount() > 0:
            raise LaspyHeaderException("Modification of the format of existing " + 
                                        "points is not currently supported. Make " + 
                                        "your modifications in numpy and create " + 
                                        "a new file.")
        self.writer.set_header_property("data_format_id", value)
        return
Set the data format ID. This is only available for files in write mode which have not yet been given points.
dataset/ETHPy150Open grantbrown/laspy/laspy/header.py/HeaderManager.set_dataformatid