[Liblas-devel] GetClassification() et al.

Peder Axensten Peder.Axensten at slu.se
Wed Sep 21 04:03:40 EDT 2011


I have a problem to write classification data into a point class instance. 
liblas gives the following ways to access the point's classification data (from point.hpp):

    //Classification& GetClassification();
    Classification GetClassification() const;
    void SetClassification(Classification const& cls);
    void SetClassification(Classification::bitset_type const& flags);
    void SetClassification(boost::uint8_t const& flags);

My problem is that all SetClassification member functions filter away the high-end bits (the Synthetic, KeyPoint, and Withheld bits). So if I do

SetClassification( liblas::Classification( 0x22 ) ),
SetClassification( static_cast< liblas::Classification::bitset_type >( 0x22 ) ), or
SetClassification( 0x22 )

GetClassification() will always return 0x02.

Also, since there is no "Classification & GetClassification();" -- it is commented out -- I can't do GetClassification().SetSynthetic( true );
(I'd prefer not to set the higher bits in this roundabout way, though.)



So to me it seems that there is no way to setting the higher bits?
And what is the rationale behind the SetClassification filtering away the high-end bits?
What am I not understanding?

Best regards,

Peder Axensten
Research engineer

Swedish University of Agricultural Sciences
Dept. of Forest Resource Management
Forest Remote Sensing


More information about the Liblas-devel mailing list