I did cc you, but your address bounced -- writing on a smartphone has its limitations, I guess...
See below. Regards, Peder : Från: Peder Axensten <[email protected]<mailto:[email protected]>> Datum: 25 oktober 2011<x-apple-data-detectors://1> 22:23:29 CEST Till: Mateusz Łoskot <[email protected]<mailto:[email protected]>> Kopia: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Ämne: Re: [Liblas-devel] GetClassification() et al. I am really sorry Mateusz, I did indeed read your mail to quickly. I think we agree that Point.GetClassification() and Point.SetClassification( ... ) should not filter the Classification in any way? (I don't really understand why there are 3 SetClassification() as Classification has constructors to cover the other two cases, but never mind.) I would think that the bug is that the right hand assignment expression of the various Point.SetClassification(...) is Classification(...).GetClass(). The correct would be static_cast<bitset>(Classification(...)) or something similar. Do you agree? As of retrieving all bits from a Classification object I had not noticed the operator bitset() member function. I guess static_cast<uint8_t>(static_cast<bitset>( p.GetClassification() ) ) will work for me, with no execution overhead. Although I'd be tempted to add an operator uint8_t() member function, for symmetry, as there is such a constructor. Best regards Peder 25 okt 2011 kl. 21:15 skrev "Mateusz Łoskot" <[email protected]<mailto:[email protected]>>: 2011/10/25<x-apple-data-detectors://8> Peder Axensten <[email protected]<mailto:[email protected]>>: I need a GetRawClassification() to be able to quickly copy the all the classification info when I copy a Point to a different point format. Using three IsXxx() is unnecessarily slow, since getting the raw classification is one copy and doing it in the present way means 4 copies, 4 and:s, 4 or:s, and 3 if:s. At least. Peder, you *can* do what you want to do and in the way you want it to do. Please, re-read previous post. For clarity, repeated below this is how you do it now std:;bitset<8> allbits = p.GetClassification(); You get *all* eight bits of classification flags, not only first 5 bits of index in classification table (we call it class index for clarity). Howard asked me to suggest a fix to the SetClassification bug and an implementation of GetRawClassification. There is no need for clunky GetRawClassification, the current interface allows you to do what you want. I now see your point and I agree. Though, the bug in misuse of GetClass() still has to be fixed. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net<http://mateusz.loskot.net/> Charter Member of OSGeo,http://osgeo.org<http://osgeo.org/> Member of ACCU, http://accu.org<http://accu.org/> 25 okt 2011 kl. 22:49 skrev "Howard Butler" <[email protected]<mailto:[email protected]>>: On Oct 25, 2011, at 2:15 PM, Mateusz Łoskot wrote: Though, the bug in misuse of GetClass() still has to be fixed. In libLAS? Or in Peder's code? I guess I'm not following closely enough here... sorry. Howard_______________________________________________ Liblas-devel mailing list [email protected]<mailto:[email protected]> http://lists.osgeo.org/mailman/listinfo/liblas-devel
_______________________________________________ Liblas-devel mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/liblas-devel
