Closed Jean-Romain closed 3 years ago
No. The header for 1.4 differs from that of previous versions. If you say that the file is a 1.4 file, reading software will expect the extended header.
Excellent question! With LAStools I will attempt to always write LAS 1.2 when the contents are fitting the LAS 1.2 specification - with the point type being the main decider. This is my personal choice for maximal compatibility of the content my software creates with existing and legacy software. I would strongly discourage "silent upgrading" where a software reads LAS 1.2 content, processes it, and then - without needing to or being explicitly instructed to - always outputs "upgraded" LAS 1.4 content.
@abellgithub well, of course but this was not really my question. I was assuming to write valid files. In this context every file type can be stored in 1.4
@rapidlasso this is pretty much my approach. If the data fits in 1.2 I'm using 1.2. I do agree that if the input is 1.2 the output is 1.2 as well unless 1.4 is absolutely required and in this case this should not be done silently but it's another question.
However when creating a brand new file I realized that everything could be 1.4 instead of doing version gymnastic to choose 1.2 or 1.4 or something else. This is why I'm asking, I think the question is particularly relevant if we consider that LAS 1.0 to 1.3 are officially superseded. To me it means: you should no longer create LAS 1.2 files. I personally have never read the spec of 1.0 to 1.3 except few tables quickly to understand the meaning of the legacy stuff in 1.4.
So, I do agree with @rapidlasso and I'm doing the same but I'm wondering if it is really what ASPRS team have in mind. To me it makes more sense to drive the choice of the LAS version using the state of the specs instead of the content of the file.
The minor version in the header should therefore accurately convey the construction of the LAS file. This is important because each minor version change has resulted in a change to the structure and interpretation of the header, and the interpretation of VLRs. If the file includes the additional header fields and/or uses the newer PDRFs 6-10, then it must say 1.4. If not, it should say 1.0/1.1/1.2/1.3 as applicable. You can't use the LAS 1.4 header fields but claim the file is LAS 1.3.
Incremental versions of LAS have generally added new fields, but you should know they have also changed the interpretation of some fields, such as the Global Encoding bits. For another example, LAS 1.0 requires a Point Data Start Signature, while 1.2 and 1.4 do not.
LAS 1.0-1.3 are officially superceded because there's nothing you can do with them that can't be done with a LAS 1.4 file. Thus there's no technical reason to use LAS 1.0, 1.1, 1.2, or 1.3 instead of LAS 1.4.
However, as @rapidlasso observed, compatibility is a very good practical reason to use LAS 1.2 instead of 1.4, and I have nothing to add to his excellent points.
Thank you, so I'll keep going with the data driven way for choosing LAS version.
When creating a LAS file it is unclear to me which minor version should be declared and used.
Based on the different files encountered in the wild my observation is that the choice of the LAS version 1.4 is used based on the content of the file. LAS version 1.4 is used for files e.g. with a WKT string and a point source id >= 6. Otherwise the file is usually 1.2 or 1.0 maybe. Thus the version relates to the content of the file.
But the specs are not clear on this aspect. My feeling and my understanding is that the version should refer to the state of the specs when the file is created. The current specs are 1.4 so files created now should be 1.4 even if the point format is e.g. 0. This way the minor version relates to the state of the specs.
I'd like to hear you about the intention behind the minor version. Said simply, should file created nowadays be version 1.4 no matter their content?