MCPcopy Create free account
hub / github.com/LAStools/LAStools / copy_from

Function copy_from

LASzip/src/laspoint.hpp:263–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 };
262
263 void copy_from(const U8* buffer) {
264 if (extended_point_type) {
265 memcpy(&X, buffer, 14);
266 ((U8*)&X)[24] = buffer[14]; // extended return number and number of returns
267 extended_classification_flags = buffer[15] & 0x0F;
268 ((U8*)&X)[15] = (buffer[15] & 0x07) << 5; // legacy classification flags
269 extended_scanner_channel = (buffer[15] >> 4) & 0x03;
270 scan_direction_flag = (buffer[15] >> 6) & 0x01;
271 edge_of_flight_line = (buffer[15] >> 7) & 0x01;
272 ((U8*)&X)[23] = buffer[16]; // extended classification
273 if (extended_classification < 32) classification = extended_classification;
274 ((U8*)&X)[17] = buffer[17]; // user data
275 ((I16*)&X)[10] = ((const I16*)buffer)[9]; // extended scan angle
276 ((U16*)&X)[9] = ((const U16*)buffer)[10]; // point source ID
277 memcpy(&gps_time, buffer + 22, 8);
278 } else {
279 memcpy(&X, buffer, 20);
280 }
281 U32 i;
282 U32 b = items[0].size;
283 for (i = 1; i < num_items; i++) {
284 memcpy(point[i], &buffer[b], items[i].size);
285 b += items[i].size;
286 }
287 };
288
289 // these functions set the desired point format (and maybe add on attributes in extra bytes)
290

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected