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

Method get_default_version

LASzip/src/laszip.cpp:627–643  ·  view source on GitHub ↗

returns the default value for "requested version" depending on point type and las version makes version 4 the default version for las 1.5 shall be used to call LASzip::request_version()

Source from the content-addressed store, hash-verified

625// makes version 4 the default version for las 1.5
626// shall be used to call LASzip::request_version()
627unsigned short LASzip::get_default_version(const unsigned char point_type, const unsigned char las_version_major, const unsigned char las_version_minor)
628{
629 if ((point_type & 63) <= 5) {
630 return 2;
631 }
632 else if (((point_type & 63) >= 6) && ((point_type & 63) <= 10)) {
633 if ((las_version_major >= 1) && (las_version_minor >= 5)) {
634 return 4;
635 }
636 else {
637 return 3;
638 }
639 }
640 else {
641 return 2; // fall back
642 }
643}
644
645// 0: no compression, invalid value if compression is used
646// 1: legacy version for point types 0-5

Callers 3

setup_laszip_itemsFunction · 0.80
openMethod · 0.80
setup_demzip_itemsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected