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

Method add_attribute

LASlib/src/lasreader_txt.cpp:1116–1143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114}
1115
1116void LASreaderTXT::add_attribute(I32 data_type, const char* name, const char* description, F64 scale, F64 offset, F64 pre_scale, F64 pre_offset, F64 no_data)
1117{
1118 attributes_data_types[number_attributes] = data_type;
1119 if (name)
1120 {
1121 attribute_names[number_attributes] = LASCopyString(name);
1122 }
1123 else
1124 {
1125 char temp[32];
1126 snprintf(temp, sizeof(temp), "attribute %d", number_attributes);
1127 attribute_names[number_attributes] = LASCopyString(temp);
1128 }
1129 if (description)
1130 {
1131 attribute_descriptions[number_attributes] = LASCopyString(description);
1132 }
1133 else
1134 {
1135 attribute_descriptions[number_attributes] = 0;
1136 }
1137 attribute_scales[number_attributes] = scale;
1138 attribute_offsets[number_attributes] = offset;
1139 attribute_pre_scales[number_attributes] = pre_scale;
1140 attribute_pre_offsets[number_attributes] = pre_offset;
1141 attribute_no_datas[number_attributes] = no_data;
1142 number_attributes++;
1143}
1144
1145BOOL LASreaderTXT::seek(const I64 p_index)
1146{

Callers 1

openMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected