| 100 | } |
| 101 | |
| 102 | bool LoadProjectUUID(const ccPointCloud& pointCloud, laszip_header& header) |
| 103 | { |
| 104 | if (pointCloud.hasMetaData(LasMetadata::PROJECT_UUID)) |
| 105 | { |
| 106 | QVariant value = pointCloud.getMetaData(LasMetadata::PROJECT_UUID); |
| 107 | QByteArray byteArray = value.toByteArray(); |
| 108 | if (byteArray.size() != 16) |
| 109 | { |
| 110 | ccLog::Warning("[LAS] Invalid project UUID meta data"); |
| 111 | return false; |
| 112 | } |
| 113 | |
| 114 | const char* bufferData = byteArray.data(); |
| 115 | |
| 116 | // 1st block (32 bits) |
| 117 | header.project_ID_GUID_data_1 = *(const laszip_U32*)bufferData; |
| 118 | bufferData += 4; |
| 119 | // 2nd block (16 bits) |
| 120 | header.project_ID_GUID_data_2 = *(const laszip_U16*)bufferData; |
| 121 | bufferData += 2; |
| 122 | // 3rd block (16 bits) |
| 123 | header.project_ID_GUID_data_3 = *(const laszip_U16*)bufferData; |
| 124 | bufferData += 2; |
| 125 | // 4th block (8 * 8 bits) |
| 126 | memcpy(header.project_ID_GUID_data_4, bufferData, 8); |
| 127 | |
| 128 | return true; |
| 129 | } |
| 130 | |
| 131 | return false; |
| 132 | } |
| 133 | |
| 134 | bool LoadVlrs(const ccPointCloud& pointCloud, LasVlr& vlr) |
| 135 | { |
no test coverage detected