[Liblas-devel] GetClassification() et al.
mateusz at loskot.net
Tue Oct 25 15:15:26 EDT 2011
2011/10/25 Peder Axensten <Peder.Axensten at slu.se>:
> 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.
Though, the bug in misuse of GetClass() still has to be fixed.
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
More information about the Liblas-devel