Skip to content
Commits on Source (4)
21 February 2019 -- bug fix when writing 4,294,967,296 or more points uncompressed to LAS
28 December 2018 -- fix for LASzip v4 decompression of WavePacket part of PRDF 9 and 10
27 December 2018 -- upped to 3.2 r9 for bug fix in multi-channel NIR decompression
7 November 2018 -- laszip DLL: upped to 3.2 r8 for identical legacy and extended flags check
20 October 2018 -- fixed rare bug in LASinterval::merge_intervals()
5 October 2018 -- laszip DLL: upped to 3.2 r6 for corrected 'is_empty' return value in laszip_inside_rectangle()
......
......@@ -7,7 +7,7 @@ set(ROOT_DIR "${PROJECT_SOURCE_DIR}")
# the next line is the ONLY place in the entire laszip system where
# the version info is hard-coded
set(LASZIP_API_VERSION_STRING "3.2.9" CACHE STRING "LASzip version" FORCE)
set(LASZIP_API_VERSION_STRING "3.3.0" CACHE STRING "LASzip version" FORCE)
include (CheckIncludeFileCXX)
include(${ROOT_DIR}/cmake/common.cmake NO_POLICY_SCOPE)
......@@ -41,7 +41,7 @@ set(LASZIP_API_VERSION ${LASZIP_API_VERSION_MAJOR}.${LASZIP_API_VERSION_MINOR}.$
# libtool SO version naming
# 8.0.0 for 3.2.1
# 9.0.0 for 4.0+
set(LASZIP_SO_VERSION "8.0.2")
set(LASZIP_SO_VERSION "8.0.3")
set(LASZIP_COMPATIBILITY_VERSION 8)
check_include_file_cxx ("unordered_map" HAVE_UNORDERED_MAP)
......
laszip (3.2.9-1) UNRELEASED; urgency=medium
laszip (3.3.0-1) UNRELEASED; urgency=medium
TODO: FastAC license issue needs to be resolved, see:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750731#16
......@@ -7,4 +7,4 @@ laszip (3.2.9-1) UNRELEASED; urgency=medium
* Initial release. (Closes: #750731)
-- Bas Couwenberg <sebastic@debian.org> Mon, 11 Feb 2019 16:04:34 +0100
-- Bas Couwenberg <sebastic@debian.org> Sun, 17 Mar 2019 08:13:05 +0100
......@@ -4,7 +4,7 @@ Upstream-Contact: Martin Isenburg <martin.isenburg@rapidlasso.com>
Source: http://www.laszip.org/
Files: *
Copyright: 2005-2017, Martin Isenburg <martin.isenburg@rapidlasso.com>
Copyright: 2005-2019, Martin Isenburg <martin.isenburg@rapidlasso.com>
2009, Mateusz Loskot <mateusz@loskot.net>
License: LGPL-2.1+
......
......@@ -9,15 +9,21 @@ LASzip - a free open source product of `rapidlasso GmbH <http://rapidlasso.com/>
Source
..............................................................................
* **2018-11-19**
* **2018-12-27**
- `laszip-3.2.8.tar.gz <https://github.com/LASzip/LASzip/releases/download/3.2.8/laszip-src-3.2.8.tar.gz>`_
`(md5) <https://github.com/LASzip/LASzip/releases/download/3.2.8/laszip-src-3.2.8.tar.gz.md5>`__
- `laszip-3.2.9.tar.gz <https://github.com/LASzip/LASzip/releases/download/3.2.9/laszip-src-3.2.9.tar.gz>`_
`(md5) <https://github.com/LASzip/LASzip/releases/download/3.2.9/laszip-src-3.2.9.tar.gz.md5>`__
Past Release(s)
~~~~~~~~~~~~~~~~~~~~~~~~~
* **2018-11-19**
- `laszip-3.2.8.tar.gz <https://github.com/LASzip/LASzip/releases/download/3.2.8/laszip-src-3.2.8.tar.gz>`_
`(md5) <https://github.com/LASzip/LASzip/releases/download/3.2.8/laszip-src-3.2.8.tar.gz.md5>`__
* **2018-03-27**
- `laszip-3.2.2.tar.gz <https://github.com/LASzip/LASzip/releases/download/3.2.2/laszip-src-3.2.2.tar.gz>`_
......
......@@ -145,6 +145,9 @@ public:
inline BOOL set_scale(F64 scale) { if (data_type) { this->scale[0] = scale; options |= 0x08; return TRUE; } return FALSE; };
inline BOOL set_offset(F64 offset) { if (data_type) { this->offset[0] = offset; options |= 0x10; return TRUE; } return FALSE; };
inline BOOL unset_scale() { if (data_type) { options &= (~0x08); return TRUE; } return FALSE; };
inline BOOL unset_offset() { if (data_type) { options &= (~0x10); return TRUE; } return FALSE; };
inline BOOL has_no_data() const { return options & 0x01; };
inline BOOL has_min() const { return options & 0x02; };
inline BOOL has_max() const { return options & 0x04; };
......@@ -156,8 +159,9 @@ public:
if (data_type)
{
const U32 size_table[10] = { 1, 1, 2, 2, 4, 4, 8, 8, 4, 8 };
U32 type = get_type();
return size_table[type];
I32 type = get_type();
I32 dim = get_dim();
return size_table[type] * dim;
}
else
{
......@@ -165,31 +169,100 @@ public:
}
};
inline F64 get_value_as_float(U8* value) const
inline F64 get_value_as_float(U8* pointer) const
{
F64 cast_value;
I32 type = get_type();
if (type == 0)
cast_value = (F64)*((U8*)pointer);
else if (type == 1)
cast_value = (F64)*((I8*)pointer);
else if (type == 2)
cast_value = (F64)*((U16*)pointer);
else if (type == 3)
cast_value = (F64)*((I16*)pointer);
else if (type == 4)
cast_value = (F64)*((U32*)pointer);
else if (type == 5)
cast_value = (F64)*((I32*)pointer);
else if (type == 6)
cast_value = (F64)(I64)*((U64*)pointer);
else if (type == 7)
cast_value = (F64)*((I64*)pointer);
else if (type == 8)
cast_value = (F64)*((F32*)pointer);
else
cast_value = *((F64*)pointer);
if (options & 0x08)
{
if (options & 0x10)
{
return offset[0]+scale[0]*cast_value;
}
else
{
return scale[0]*cast_value;
}
}
else
{
if (options & 0x10)
{
return offset[0]+cast_value;
}
else
{
return cast_value;
}
}
};
inline void set_value_as_float(U8* pointer, F64 value) const
{
F64 unoffset_and_unscaled_value;
if (options & 0x08)
{
if (options & 0x10)
{
unoffset_and_unscaled_value = (value - offset[0])/scale[0];
}
else
{
unoffset_and_unscaled_value = value/scale[0];
}
}
else
{
if (options & 0x10)
{
F64 casted_value;
unoffset_and_unscaled_value = value - offset[0];
}
else
{
unoffset_and_unscaled_value = value;
}
}
I32 type = get_type();
if (type == 0)
casted_value = (F64)*((U8*)value);
*((U8*)pointer) = U8_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 1)
casted_value = (F64)*((I8*)value);
*((I8*)pointer) = I8_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 2)
casted_value = (F64)*((U16*)value);
*((U16*)pointer) = U16_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 3)
casted_value = (F64)*((I16*)value);
*((I16*)pointer) = I16_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 4)
casted_value = (F64)*((U32*)value);
*((U32*)pointer) = U32_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 5)
casted_value = (F64)*((I32*)value);
*((I32*)pointer) = U32_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 6)
casted_value = (F64)(I64)*((U64*)value);
*((U64*)pointer) = U64_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 7)
casted_value = (F64)*((I64*)value);
*((I64*)pointer) = I64_QUANTIZE(unoffset_and_unscaled_value);
else if (type == 8)
casted_value = (F64)*((F32*)value);
*((F32*)pointer) = (F32)unoffset_and_unscaled_value;
else
casted_value = *((F64*)value);
return offset[0]+scale[0]*casted_value;
*((F64*)pointer) = unoffset_and_unscaled_value;
};
private:
......@@ -197,35 +270,35 @@ private:
{
return ((I32)data_type - 1)%10;
};
inline I32 get_dim() const
inline I32 get_dim() const // compute dimension of deprecated tuple and triple attributes
{
return 1;
return ((I32)data_type - 1)/10 + 1;
};
inline U64I64F64 cast(U8* value) const
inline U64I64F64 cast(U8* pointer) const
{
I32 type = get_type();
U64I64F64 casted_value;
U64I64F64 cast_value;
if (type == 0)
casted_value.u64 = *((U8*)value);
cast_value.u64 = *((U8*)pointer);
else if (type == 1)
casted_value.i64 = *((I8*)value);
cast_value.i64 = *((I8*)pointer);
else if (type == 2)
casted_value.u64 = *((U16*)value);
cast_value.u64 = *((U16*)pointer);
else if (type == 3)
casted_value.i64 = *((I16*)value);
cast_value.i64 = *((I16*)pointer);
else if (type == 4)
casted_value.u64 = *((U32*)value);
cast_value.u64 = *((U32*)pointer);
else if (type == 5)
casted_value.i64 = *((I32*)value);
cast_value.i64 = *((I32*)pointer);
else if (type == 6)
casted_value.u64 = *((U64*)value);
cast_value.u64 = *((U64*)pointer);
else if (type == 7)
casted_value.i64 = *((I64*)value);
cast_value.i64 = *((I64*)pointer);
else if (type == 8)
casted_value.f64 = *((F32*)value);
cast_value.f64 = *((F32*)pointer);
else
casted_value.f64 = *((F64*)value);
return casted_value;
cast_value.f64 = *((F64*)pointer);
return cast_value;
};
inline U64I64F64 smallest(U64I64F64 a, U64I64F64 b) const
{
......@@ -431,6 +504,15 @@ public:
return -1;
}
const CHAR* get_attribute_name(I32 index) const
{
if (index < number_attributes)
{
return attributes[index].name;
}
return 0;
}
BOOL remove_attribute(I32 index)
{
if (index < 0 || index >= number_attributes)
......
......@@ -694,6 +694,14 @@ public:
return 0.0;
};
inline void set_attribute_as_float(U32 index, F64 value) const
{
if (has_attribute(index))
{
attributer->attributes[index].set_value_as_float(extra_bytes + attributer->attribute_starts[index], value);
}
};
// typed and offset functions for attributes in extra bytes (more efficient)
inline void get_attribute(I32 start, U8 &data) const { data = extra_bytes[start]; };
......
......@@ -13,7 +13,7 @@
COPYRIGHT:
(c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality
(c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality
This is free software; you can redistribute and/or modify it under the
terms of the GNU Lesser General Licence as published by the Free Software
......@@ -299,6 +299,8 @@ BOOL LASwritePoint::write(const U8 * const * point)
U32 context = 0;
if (chunk_count == chunk_size)
{
if (enc)
{
if (layered_las14_compression)
{
......@@ -320,6 +322,12 @@ BOOL LASwritePoint::write(const U8 * const * point)
}
add_chunk_to_table();
init(outstream);
}
else
{
// happens *only* for uncompressed LAS with over U32_MAX points
assert(chunk_size == U32_MAX);
}
chunk_count = 0;
}
chunk_count++;
......
......@@ -13,7 +13,7 @@
COPYRIGHT:
(c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality
(c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality
This is free software; you can redistribute and/or modify it under the
terms of the GNU Lesser General Licence as published by the Free Software
......@@ -24,6 +24,7 @@
CHANGE HISTORY:
21 February 2019 -- fix for writing 4294967295+ points uncompressed to LAS
28 August 2017 -- moving 'context' from global development hack to interface
23 August 2016 -- layering of items for selective decompression in LAS 1.4
6 September 2014 -- removed inheritance of EntropyEncoder and EntropyDecoder
......
......@@ -258,7 +258,7 @@ bool LASzip::check_item(const LASitem* item)
break;
case LASitem::WAVEPACKET14:
if (item->size != 29) return return_error("WAVEPACKET14 has size != 29");
if ((item->version != 0) && (item->version != 3)) return return_error("WAVEPACKET14 has version != 0 and != 3 and != 4"); // version == 4 fixes context-switch
if ((item->version != 0) && (item->version != 3) && (item->version != 4)) return return_error("WAVEPACKET14 has version != 0 and != 3 and != 4"); // version == 4 fixes context-switch
break;
default:
if (1)
......
......@@ -14,7 +14,7 @@
COPYRIGHT:
(c) 2007-2018, martin isenburg, rapidlasso - fast tools to catch reality
(c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality
This is free software; you can redistribute and/or modify it under the
terms of the GNU Lesser General Licence as published by the Free Software
......@@ -25,6 +25,8 @@
CHANGE HISTORY:
21 February 2019 -- bug fix when writing 4294967295+ points uncompressed to LAS
28 December 2018 -- fix for v4 decompression of WavePacket part of PRDF 9 and 10
27 December 2018 -- upped to 3.2 r9 for bug fix in multi-channel NIR decompression
7 November 2018 -- upped to 3.2 r8 for identical legacy and extended flags check
20 October 2018 -- upped to 3.2 r7 for rare bug in LASinterval::merge_intervals()
......@@ -70,9 +72,9 @@ typedef long long SIGNED_INT64;
#endif
#define LASZIP_VERSION_MAJOR 3
#define LASZIP_VERSION_MINOR 2
#define LASZIP_VERSION_REVISION 9
#define LASZIP_VERSION_BUILD_DATE 181227
#define LASZIP_VERSION_MINOR 3
#define LASZIP_VERSION_REVISION 0
#define LASZIP_VERSION_BUILD_DATE 190308
#define LASZIP_COMPRESSOR_NONE 0
#define LASZIP_COMPRESSOR_POINTWISE 1
......