[Liblas-devel] Writing Scan Angle Rank values

Howard Butler hobu.inc at gmail.com
Thu May 1 14:11:56 EDT 2008


Mateusz,

The specification says the following for Scan Angle:

Scan Angle Rank (-90 to +90) – Left side unsigned char 1 byte *

We are doing the following:
int8_t GetScanAngleRank() const;
void SetScanAngleRank(int8_t const& rank);

int8_t is defined as:

typedef signed char     int8_t;


If I write the following:
p = point.Point()
p.scan_angle = -90

The Scan Angle returned is:

Scan Angle Rank:	166


Do you have any idea why the Scan Angle Ranks cannot be roundtripped?   
I would expect the Scan Angle Rank to be -90 in the file as I have set  
it.  The specification is unclear to me.  If we are supposed to store  
Scan Angle Rank as an unsigned char, how are  we to store negative  
values?  Are we supposed to determine +/- from the Scan Direction and  
then store 0-90 in the Scan Angle Rank?

Howard


More information about the Liblas-devel mailing list