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()
| 625 | // makes version 4 the default version for las 1.5 |
| 626 | // shall be used to call LASzip::request_version() |
| 627 | unsigned 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 |
no outgoing calls
no test coverage detected