61 std::unique_ptr<QgsPointCloudBlock> block =
nullptr;
64 block = mIndex->nodeData( node, mRequest );
90 const QVector<QgsPointCloudAttribute> attributes = attributesCollection.
attributes();
91 const char *ptr = block->data();
92 int count = block->pointCount();
95 QMap<QString, QgsPointCloudAttributeStatistics> statsMap;
99 summary.
minimum = std::numeric_limits<double>::max();
100 summary.
maximum = std::numeric_limits<double>::lowest();
103 summary.
stDev = std::numeric_limits<double>::quiet_NaN();
105 statsMap[ attribute.name() ] = summary;
108 QVector<int> attributeOffsetVector;
109 QSet<int> classifiableAttributesOffsetSet;
112 int attributeOffset = 0;
113 attributesCollection.
find( attribute.name(), attributeOffset );
114 attributeOffsetVector.push_back( attributeOffset );
115 if ( attribute.name() == QLatin1String(
"ScannerChannel" ) ||
116 attribute.name() == QLatin1String(
"ReturnNumber" ) ||
117 attribute.name() == QLatin1String(
"NumberOfReturns" ) ||
118 attribute.name() == QLatin1String(
"ScanDirectionFlag" ) ||
119 attribute.name() == QLatin1String(
"Classification" ) ||
120 attribute.name() == QLatin1String(
"EdgeOfFlightLine" ) ||
121 attribute.name() == QLatin1String(
"PointSourceId" ) ||
122 attribute.name() == QLatin1String(
"Synthetic" ) ||
123 attribute.name() == QLatin1String(
"KeyPoint" ) ||
124 attribute.name() == QLatin1String(
"Withheld" ) ||
125 attribute.name() == QLatin1String(
"Overlap" ) )
127 classifiableAttributesOffsetSet.insert( attributeOffset );
131 for (
int i = 0; i < count; ++i )
133 for (
int j = 0; j < attributes.size(); ++j )
139 QString attributeName = attributes.at( j ).name();
142 double attributeValue = 0;
143 int attributeOffset = attributeOffsetVector[ j ];
149 stats.
mean += attributeValue / count;
152 if ( classifiableAttributesOffsetSet.contains( attributeOffset ) )