[Git][debian-gis-team/laszip][master] 4 commits: New upstream version 3.3.0

Bas Couwenberg gitlab at salsa.debian.org
Sun Mar 17 07:17:55 GMT 2019


Bas Couwenberg pushed to branch master at Debian GIS Project / laszip


Commits:
0b8e722c by Bas Couwenberg at 2019-03-17T07:12:50Z
New upstream version 3.3.0
- - - - -
d6db7aa6 by Bas Couwenberg at 2019-03-17T07:12:51Z
Merge tag 'upstream/3.3.0'

Upstream version 3.3.0

- - - - -
799710f1 by Bas Couwenberg at 2019-03-17T07:13:22Z
New upstream release.

- - - - -
3a8b87cc by Bas Couwenberg at 2019-03-17T07:14:39Z
Update copyright years for Martin Isenburg.

- - - - -


11 changed files:

- CHANGES.txt
- CMakeLists.txt
- debian/changelog
- debian/copyright
- docs/source/index.rst
- src/lasattributer.hpp
- src/laspoint.hpp
- src/laswritepoint.cpp
- src/laswritepoint.hpp
- src/laszip.cpp
- src/laszip.hpp


Changes:

=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,6 @@
+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()


=====================================
CMakeLists.txt
=====================================
@@ -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)


=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-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 at debian.org>  Mon, 11 Feb 2019 16:04:34 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 17 Mar 2019 08:13:05 +0100


=====================================
debian/copyright
=====================================
@@ -4,7 +4,7 @@ Upstream-Contact: Martin Isenburg <martin.isenburg at rapidlasso.com>
 Source: http://www.laszip.org/
 
 Files: *
-Copyright: 2005-2017, Martin Isenburg <martin.isenburg at rapidlasso.com>
+Copyright: 2005-2019, Martin Isenburg <martin.isenburg at rapidlasso.com>
                 2009, Mateusz Loskot <mateusz at loskot.net>
 License: LGPL-2.1+
 


=====================================
docs/source/index.rst
=====================================
@@ -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>`_


=====================================
src/lasattributer.hpp
=====================================
@@ -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 casted_value;
+    F64 cast_value;
     I32 type = get_type();
     if (type == 0)
-      casted_value = (F64)*((U8*)value);
+      cast_value = (F64)*((U8*)pointer);
     else if (type == 1)
-      casted_value = (F64)*((I8*)value);
+      cast_value = (F64)*((I8*)pointer);
     else if (type == 2)
-      casted_value = (F64)*((U16*)value);
+      cast_value = (F64)*((U16*)pointer);
     else if (type == 3)
-      casted_value = (F64)*((I16*)value);
+      cast_value = (F64)*((I16*)pointer);
     else if (type == 4)
-      casted_value = (F64)*((U32*)value);
+      cast_value = (F64)*((U32*)pointer);
     else if (type == 5)
-      casted_value = (F64)*((I32*)value);
+      cast_value = (F64)*((I32*)pointer);
     else if (type == 6)
-      casted_value = (F64)(I64)*((U64*)value);
+      cast_value = (F64)(I64)*((U64*)pointer);
     else if (type == 7)
-      casted_value = (F64)*((I64*)value);
+      cast_value = (F64)*((I64*)pointer);
     else if (type == 8)
-      casted_value = (F64)*((F32*)value);
+      cast_value = (F64)*((F32*)pointer);
     else
-      casted_value = *((F64*)value);
-    return offset[0]+scale[0]*casted_value;
+      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)
+      {
+        unoffset_and_unscaled_value = value - offset[0];
+      }
+      else
+      {
+        unoffset_and_unscaled_value = value;
+      }
+    }
+    I32 type = get_type();
+    if (type == 0)
+      *((U8*)pointer) = U8_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 1)
+      *((I8*)pointer) = I8_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 2)
+      *((U16*)pointer) = U16_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 3)
+      *((I16*)pointer) = I16_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 4)
+      *((U32*)pointer) = U32_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 5)
+      *((I32*)pointer) = U32_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 6)
+      *((U64*)pointer) = U64_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 7)
+      *((I64*)pointer) = I64_QUANTIZE(unoffset_and_unscaled_value);
+    else if (type == 8)
+      *((F32*)pointer) = (F32)unoffset_and_unscaled_value;
+    else
+      *((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)


=====================================
src/laspoint.hpp
=====================================
@@ -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]; };


=====================================
src/laswritepoint.cpp
=====================================
@@ -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
@@ -300,26 +300,34 @@ BOOL LASwritePoint::write(const U8 * const * point)
 
   if (chunk_count == chunk_size)
   {
-    if (layered_las14_compression)
+    if (enc)
     {
-      // write how many points are in the chunk
-      outstream->put32bitsLE((U8*)&chunk_count);
-      // write all layers 
-      for (i = 0; i < num_writers; i++)
+      if (layered_las14_compression)
       {
-        ((LASwriteItemCompressed*)writers[i])->chunk_sizes();
+        // write how many points are in the chunk
+        outstream->put32bitsLE((U8*)&chunk_count);
+        // write all layers 
+        for (i = 0; i < num_writers; i++)
+        {
+          ((LASwriteItemCompressed*)writers[i])->chunk_sizes();
+        }
+        for (i = 0; i < num_writers; i++)
+        {
+          ((LASwriteItemCompressed*)writers[i])->chunk_bytes();
+        }
       }
-      for (i = 0; i < num_writers; i++)
+      else
       {
-        ((LASwriteItemCompressed*)writers[i])->chunk_bytes();
+        enc->done();
       }
+      add_chunk_to_table();
+      init(outstream);
     }
     else
     {
-      enc->done();
+      // happens *only* for uncompressed LAS with over U32_MAX points 
+      assert(chunk_size == U32_MAX);
     }
-    add_chunk_to_table();
-    init(outstream);
     chunk_count = 0;
   }
   chunk_count++;


=====================================
src/laswritepoint.hpp
=====================================
@@ -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


=====================================
src/laszip.cpp
=====================================
@@ -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)


=====================================
src/laszip.hpp
=====================================
@@ -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,11 +25,13 @@
 
   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()
      5 October 2018 -- upped to 3.2 r6 for corrected 'is_empty' return value
-    28 September 2018 -- upped to 3.2 r5 for fix in extended classification writing 
+    28 September 2018 -- upped to 3.2 r5 for fix in extended classification writing
      9 February 2018 -- minor version increment as it can read v4 compressed items
     28 December 2017 -- fix incorrect 'context switch' reported by Wanwannodao
     23 August 2017 -- minor version increment for C++ stream-based read/write API
@@ -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



View it on GitLab: https://salsa.debian.org/debian-gis-team/laszip/compare/4e04da537809a66244d2ffc0e2b85cf710b7001d...3a8b87cc3ee7906f1d84f9ef450cdf9f33abd27f

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/laszip/compare/4e04da537809a66244d2ffc0e2b85cf710b7001d...3a8b87cc3ee7906f1d84f9ef450cdf9f33abd27f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190317/82f75a82/attachment-0001.html>


More information about the Pkg-grass-devel mailing list