[Liblas-devel] GetClassification() et al.

Peder Axensten Peder.Axensten at slu.se
Mon Oct 24 10:21:38 EDT 2011


Hi Martin,

I'm interested in retrieving and setting all the eight bits at once. I need to copy all the classification information and doing it in four steps (class, withheld, synthetic, and key_point) would be ineffective. 

And yes, presently there is *no* way (that I can see) to set the higher three bits, as there is no way to get a non-const reference to Classification:
>> there is no "Classification & GetClassification();" -- it is commented out -- I can't do GetClassification().SetSynthetic( true );

Regards,
Peder


On 24 okt 2011, at 15:44, Martin Isenburg wrote:

> hi,
> 
> LAS only defines the lower 5 bits as classification bits. so is your
> question how to set the "withheld" or "synthetic" bit? Or are you
> saying the "setSynthetic()" function is not existing or working
> properly?
> 
> cheers,
> 
> martin @lastools
> 
> 2011/10/24 Peder Axensten <Peder.Axensten at slu.se>:
>> I posted the text below some time ago, but got no answer.
>> How can I report a bug?
>> I went to the tracker but I found no information on how to do it?
>> 
>> Best regards,
>> 
>> Peder Axensten
>> Research engineer
>> 
>> Swedish University of Agricultural Sciences
>> Dept. of Forest Resource Management
>> Forest Remote Sensing
>> 
>> 
>> 
>> **********************
>> 
>> 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
>> _______________________________________________
>> Liblas-devel mailing list
>> Liblas-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/liblas-devel
>> 



More information about the Liblas-devel mailing list