You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an API to update the header of a laz file? Right now I am using the chunked writing pattern, however that is very slow since we have to decompress and recompress the data.
My current use case is that I need to patch wrong CRS information in the header.
The text was updated successfully, but these errors were encountered:
It is the best way if you want to ensure that the file is correct (otherwise laspy has a bug)
The problem with what you want to achieve is that changing the VLR will likely change its length, which means we have the same problem as in #277
If the new length is greater, you would overwrite points by writing that new header/vlr, so the only option is to rewrite the whole file
If the new length is the same, then its ok
If the new length is smaller, you might be able to achieve what you want but that involves padding the header by setting the LasHeader.extra_header_bytes or extra_vlr_bytes so that the new length matches the old one
You can use LasHeader.read_from/write_to methods to do that. And write to temporary io.BytesIO to check the lengths
Is there an API to update the header of a laz file? Right now I am using the chunked writing pattern, however that is very slow since we have to decompress and recompress the data.
My current use case is that I need to patch wrong CRS information in the header.
The text was updated successfully, but these errors were encountered: