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" ) )
123 classifiableAttributesOffsetSet.insert( attributeOffset );
127 for (
int i = 0; i < count; ++i )
129 for (
int j = 0; j < attributes.size(); ++j )
135 QString attributeName = attributes.at( j ).name();
138 double attributeValue = 0;
139 int attributeOffset = attributeOffsetVector[ j ];
145 stats.
mean += attributeValue / count;
148 if ( classifiableAttributesOffsetSet.contains( attributeOffset ) )