PDAL/PDAL — Issue #57: TerraSolid .bin files can have alternative color/time header indicators 
Author: hobu
Created: 2011-11-09 14:30:13+00:00
State: open

From a private email:

```
Based on experience, and confirmed by TerraSolid itself, the header file of Terrascan
binary file can content an error on the 'gps time' flag.
The flag value to define if records include 'gps time' can be
1 or 8 (depending of some obscure reasons).
Your reading header code (src/drivers/terrasolid/Reader.cpp) is:

105 m_haveColor = (m_header->Color==1);
106 m_haveTime = (m_header->Time==1);

if m_header->Time is set to 8, m_haveTime is FALSE but should be TRUE.

I propose you (as did to my code) to change this line to:

105 m_haveColor = (m_header->Color!= 0 );
106 m_haveTime = (m_header->Time != 0);

if you don't do that, you'll read binary records with shift of size_of(unsigned int).

knowing the header size and the individual record size, you also can check,
according the file size, if:
- the number of point is correct,
- the color and gps time flags are correct.
```