MCPcopy Create free account
hub / github.com/PDAL/PDAL / WriteData3DGroupsData

Method WriteData3DGroupsData

plugins/e57/libE57Format/src/WriterImpl.cpp:1311–1353  ·  view source on GitHub ↗

This function writes out the group data

Source from the content-addressed store, hash-verified

1309
1310 // This function writes out the group data
1311 bool WriterImpl::WriteData3DGroupsData( int64_t dataIndex, size_t groupCount,
1312 int64_t *idElementValue, int64_t *startPointIndex,
1313 int64_t *pointCount )
1314 {
1315 if ( ( dataIndex < 0 ) || ( dataIndex >= data3D_.childCount() ) )
1316 {
1317 return false;
1318 }
1319
1320 const StructureNode scan( data3D_.get( dataIndex ) );
1321
1322 if ( !scan.isDefined( "pointGroupingSchemes" ) )
1323 {
1324 return false;
1325 }
1326
1327 const StructureNode pointGroupingSchemes( scan.get( "pointGroupingSchemes" ) );
1328
1329 if ( !pointGroupingSchemes.isDefined( "groupingByLine" ) )
1330 {
1331 return false;
1332 }
1333
1334 const StructureNode groupingByLine( pointGroupingSchemes.get( "groupingByLine" ) );
1335
1336 if ( !groupingByLine.isDefined( "groups" ) )
1337 {
1338 return false;
1339 }
1340
1341 CompressedVectorNode groups( groupingByLine.get( "groups" ) );
1342
1343 std::vector<SourceDestBuffer> groupSDBuffers;
1344 groupSDBuffers.emplace_back( imf_, "idElementValue", idElementValue, groupCount, true );
1345 groupSDBuffers.emplace_back( imf_, "startPointIndex", startPointIndex, groupCount, true );
1346 groupSDBuffers.emplace_back( imf_, "pointCount", pointCount, groupCount, true );
1347
1348 CompressedVectorWriter writer = groups.writer( groupSDBuffers );
1349 writer.write( groupCount );
1350 writer.close();
1351
1352 return true;
1353 }
1354
1355 StructureNode WriterImpl::GetRawE57Root()
1356 {

Callers

nothing calls this directly

Calls 6

childCountMethod · 0.45
getMethod · 0.45
isDefinedMethod · 0.45
writerMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected