61 if ( mIndex->nodePointCount( node ) < 1 )
64 std::unique_ptr<QgsPointCloudBlock> block =
nullptr;
67 block = mIndex->nodeData( node, mRequest );
93 const QVector<QgsPointCloudAttribute> attributes = attributesCollection.
attributes();
94 const char *ptr = block->data();
95 int count = block->pointCount();
98 QMap<QString, QgsPointCloudAttributeStatistics> statsMap;
102 summary.
minimum = std::numeric_limits<double>::max();
103 summary.
maximum = std::numeric_limits<double>::lowest();
106 summary.
stDev = std::numeric_limits<double>::quiet_NaN();
108 statsMap[ attribute.name() ] = summary;
111 QVector<int> attributeOffsetVector;
112 QSet<int> classifiableAttributesOffsetSet;
115 int attributeOffset = 0;
116 attributesCollection.
find( attribute.name(), attributeOffset );
117 attributeOffsetVector.push_back( attributeOffset );
118 if ( attribute.name() == QLatin1String(
"ScannerChannel" ) ||
119 attribute.name() == QLatin1String(
"ReturnNumber" ) ||
120 attribute.name() == QLatin1String(
"NumberOfReturns" ) ||
121 attribute.name() == QLatin1String(
"ScanDirectionFlag" ) ||
122 attribute.name() == QLatin1String(
"Classification" ) ||
123 attribute.name() == QLatin1String(
"EdgeOfFlightLine" ) ||
124 attribute.name() == QLatin1String(
"PointSourceId" ) ||
125 attribute.name() == QLatin1String(
"Synthetic" ) ||
126 attribute.name() == QLatin1String(
"KeyPoint" ) ||
127 attribute.name() == QLatin1String(
"Withheld" ) ||
128 attribute.name() == QLatin1String(
"Overlap" ) )
130 classifiableAttributesOffsetSet.insert( attributeOffset );
134 for (
int i = 0; i < count; ++i )
136 for (
int j = 0; j < attributes.size(); ++j )
142 QString attributeName = attributes.at( j ).name();
145 double attributeValue = 0;
146 int attributeOffset = attributeOffsetVector[ j ];
152 stats.
mean += attributeValue / count;
155 if ( classifiableAttributesOffsetSet.contains( attributeOffset ) )