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

Method get_Z

LASlib/src/lastransform.cpp:136–152  ·  view source on GitHub ↗

get the origin Z and consider whether Z is fetched from the extrabyte (z_from_attrib)

Source from the content-addressed store, hash-verified

134
135/// get the origin Z and consider whether Z is fetched from the extrabyte (z_from_attrib)
136I32 LASoperation::get_Z(LASpoint* point) {
137 I64 Z = 0;
138
139 if (offset_adjust && point->quantizer != nullptr && point->quantizer->z_from_attrib >= 0) {
140 // get Z from extrabyte
141 F64 z_tmp = (point->get_Z() * scale_factor_z) + adjusted_offset_z;
142 if (z_tmp >= orig_z_offset)
143 Z = (I64)(((z_tmp - orig_z_offset) / orig_z_scale_factor) + 0.5);
144 else
145 Z = (I64)(((z_tmp - orig_z_offset) / orig_z_scale_factor) - 0.5);
146 } else {
147 // Default case or no offset adjustment
148 Z = point->get_Z();
149 }
150
151 return I32_CLAMP(Z);
152};
153
154/// sets the new offset based on the points if point coordinates were not changed during the operation or transformed
155void LASoperation::set_offset_adjust_coord_without_trafo_changes(LASpoint* point){

Callers 15

mainFunction · 0.80
mainFunction · 0.80
check_pointsFunction · 0.80
runMethod · 0.80
get_ZFunction · 0.80
set_zFunction · 0.80
compute_XYZFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
transformMethod · 0.80
transformMethod · 0.80
transformMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected