62 if ( mIndex->nodePointCount( node ) < 1 )
65 std::unique_ptr<QgsPointCloudBlock> block =
nullptr;
68 block = mIndex->nodeData( node, mRequest );
94 const QVector<QgsPointCloudAttribute> attributes = attributesCollection.
attributes();
95 const char *ptr = block->data();
96 int count = block->pointCount();
99 QMap<QString, QgsPointCloudAttributeStatistics> statsMap;
103 summary.
minimum = std::numeric_limits<double>::max();
104 summary.
maximum = std::numeric_limits<double>::lowest();
107 summary.
stDev = std::numeric_limits<double>::quiet_NaN();
109 statsMap[ attribute.name() ] = summary;
112 QVector<int> attributeOffsetVector;
113 QSet<int> classifiableAttributesOffsetSet;
116 int attributeOffset = 0;
117 attributesCollection.
find( attribute.name(), attributeOffset );
118 attributeOffsetVector.push_back( attributeOffset );
119 if ( attribute.name() == QLatin1String(
"ScannerChannel" ) ||
120 attribute.name() == QLatin1String(
"ReturnNumber" ) ||
121 attribute.name() == QLatin1String(
"NumberOfReturns" ) ||
122 attribute.name() == QLatin1String(
"ScanDirectionFlag" ) ||
123 attribute.name() == QLatin1String(
"Classification" ) ||
124 attribute.name() == QLatin1String(
"EdgeOfFlightLine" ) ||
125 attribute.name() == QLatin1String(
"PointSourceId" ) ||
126 attribute.name() == QLatin1String(
"Synthetic" ) ||
127 attribute.name() == QLatin1String(
"KeyPoint" ) ||
128 attribute.name() == QLatin1String(
"Withheld" ) ||
129 attribute.name() == QLatin1String(
"Overlap" ) )
131 classifiableAttributesOffsetSet.insert( attributeOffset );
135 for (
int i = 0; i < count; ++i )
137 for (
int j = 0; j < attributes.size(); ++j )
143 QString attributeName = attributes.at( j ).name();
146 double attributeValue = 0;
147 int attributeOffset = attributeOffsetVector[ j ];
153 stats.
mean += attributeValue / count;
156 if ( classifiableAttributesOffsetSet.contains( attributeOffset ) )