[Liblas-devel] LASzip issue in libLAS. Extra Bytes not supported?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Liblas-devel] LASzip issue in libLAS. Extra Bytes not supported?

isenburg
Hello,

apparently the attached compressed LAZ file does not survive the round trip via libLAS' las2las ... can someone verify (or explain / debug)?

C:\OSGeo4W64\bin\las2las -v paul.laz  --output paul_liblas.laz

E:\LAStools\bin>lasinfo -i paul.laz
lasinfo (170330) report for paul.laz
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            0
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.2
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'txt2las (version 170402)'
  file creation day/year:     96/2017
  header size:                227
  offset to point data:       1451
  number var. length records: 2
  point data format:          1
  point data record length:   35
  number of point records:    5024
  number of points by return: 3051 1503 411 57 2
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               4300000 5600000 0
  min x y z:                  4376272.35 5683751.73 452.29
  max x y z:                  4376671.84 5683959.33 484.91
variable length header record 1 of 2:
  reserved             0
  user ID              'LASF_Spec'
  record ID            4
  length after header  960
  description          'by LAStools of rapidlasso GmbH'
    Extra Byte Descriptions
      data type: 3 (unsigned short), name "echo width", description: "Full width at half maximum [ns]", scale: 0.1, offset: 0 (not set)
      data type: 4 (short), name "LAS 1.4 scan angle", description: "additional attributes", scale: 0.006, offset: 0 (not set)
      data type: 1 (unsigned char), name "LAS 1.4 extended returns", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
      data type: 1 (unsigned char), name "LAS 1.4 classification", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
      data type: 1 (unsigned char), name "LAS 1.4 flags and channel", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
variable length header record 2 of 2:
  reserved             0
  user ID              'lascompatible'
  record ID            22204
  length after header  156
  description          'by LAStools of rapidlasso GmbH'
LASzip compression (version 2.5r2 c2 50000): POINT10 2 GPSTIME11 2 BYTE 2
reporting minimum and maximum for all LAS point record entries ...
  X             7627235    7667184
  Y             8375173    8395933
  Z               45229      48491
  intensity          10        346
  return_number       1          5
  number_of_returns   1          5
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      0          0
  scan_angle_rank     0          0
  user_data           0          0
  point_source_ID     3          5
  gps_time 0.000000 0.000000
number of first returns:        3051
number of intermediate returns: 470
number of last returns:         3051
number of single returns:       1548
overview over number of returns of given pulse: 1548 2184 1062 220 10 0 0
histogram of classification of points:
            5024  never classified (0)

E:\LAStools\bin>lasinfo -i paul_liblas.laz
lasinfo (170330) report for paul_liblas.laz
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            0
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.2
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'txt2las (version 170402)'
  file creation day/year:     96/2017
  header size:                227
  offset to point data:       8774
  number var. length records: 3
  point data format:          1
  point data record length:   35
  number of point records:    5024
  number of points by return: 3051 1503 411 57 2
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               4300000 5600000 0
  min x y z:                  4376272.35 5683751.73 452.29
  max x y z:                  4376671.84 5683959.33 484.91
variable length header record 1 of 3:
  reserved             0
  user ID              'LASF_Spec'
  record ID            4
  length after header  960
  description          'by LAStools of rapidlasso GmbH'
    Extra Byte Descriptions
      data type: 3 (unsigned short), name "echo width", description: "Full width at half maximum [ns]", scale: 0.1, offset: 0 (not set)
      data type: 4 (short), name "LAS 1.4 scan angle", description: "additional attributes", scale: 0.006, offset: 0 (not set)
      data type: 1 (unsigned char), name "LAS 1.4 extended returns", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
      data type: 1 (unsigned char), name "LAS 1.4 classification", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
      data type: 1 (unsigned char), name "LAS 1.4 flags and channel", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
variable length header record 2 of 3:
  reserved             0
  user ID              'lascompatible'
  record ID            22204
  length after header  156
  description          'by LAStools of rapidlasso GmbH'
variable length header record 3 of 3:
  reserved             43707
  user ID              'liblas'
  record ID            7
  length after header  7269
  description          'http://liblas.org/schema/'
LASzip compression (version 2.2r0 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
ERROR: 'end-of-file during chunk with index 0' after 1638 of 5024 points
  X          -2140398450 2143434216
  Y          -2141878466 2146152511
  Z          -2145714721 2146156107
  intensity           0      65535
  return_number       0          7
  number_of_returns   0          7
  edge_of_flight_line 0          1
  scan_direction_flag 0          1
  classification      0         31
  scan_angle_rank  -128        127
  user_data           0        254
  point_source_ID     3      65498
  gps_time -0.000000 0.000000
WARNING: range violates GPS week time specified by global encoding bit 0
WARNING: 1637 points outside of header bounding box
number of first returns:        467
number of intermediate returns: 352
number of last returns:         922
number of single returns:       391
WARNING: real number of point records (1638) is different from header entry (5024).
WARNING: for return 1 real number of points by return (230) is different from header entry (3051).
WARNING: for return 2 real number of points by return (230) is different from header entry (1503).
WARNING: for return 3 real number of points by return (193) is different from header entry (411).
WARNING: for return 4 real number of points by return (189) is different from header entry (57).
WARNING: for return 5 real number of points by return (188) is different from header entry (2).
WARNING: there are 237 points with return number 0
WARNING: there are 180 points with return number 6
WARNING: there are 191 points with return number 7
overview over number of returns of given pulse: 182 258 208 223 179 198 181
WARNING: there are 209 points with a number of returns of given pulse of 0
histogram of classification of points:
              67  never classified (0)
              51  unclassified (1)
              54  ground (2)
              55  low vegetation (3)
              63  medium vegetation (4)
              64  high vegetation (5)
              46  building (6)
              54  noise (7)
              35  keypoint (8)
              40  water (9)
              41  rail (10)
              54  road surface (11)
              49  overlap (12)
              53  wire guard (13)
              36  wire conductor (14)
              46  tower (15)
              62  wire connector (16)
              41  bridge deck (17)
              54  Reserved for ASPRS Definition (18)
              42  Reserved for ASPRS Definition (19)
              52  Reserved for ASPRS Definition (20)
              52  Reserved for ASPRS Definition (21)
              69  Reserved for ASPRS Definition (22)
              33  Reserved for ASPRS Definition (23)
              57  Reserved for ASPRS Definition (24)
              67  Reserved for ASPRS Definition (25)
              55  Reserved for ASPRS Definition (26)
              52  Reserved for ASPRS Definition (27)
              59  Reserved for ASPRS Definition (28)
              39  Reserved for ASPRS Definition (29)
              52  Reserved for ASPRS Definition (30)
              44  Reserved for ASPRS Definition (31)
 +-> flagged as synthetic: 841
 +-> flagged as keypoints: 855
 +-> flagged as withheld:  804
real max x larger than header max x by 21357670.320000
real min x smaller than header min x by 21480256.850000
real max y larger than header max y by 21377565.780000
real min y smaller than header min y by 21502536.390000
real max z larger than header max z by 21461076.160000
real min z smaller than header min z by 21457599.500000


_______________________________________________
Liblas-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/liblas-devel

paul.laz (36K) Download Attachment
paul_liblas.laz (45K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] LASzip issue in libLAS. Extra Bytes not supported?

Howard Butler-3
Thanks for the report Martin. There is indeed a bug in libLAS' LAZ support when files have extra bytes in them.

Filed here. https://github.com/libLAS/libLAS/issues/119

Howard

> On Apr 6, 2017, at 1:24 PM, Martin Isenburg <[hidden email]> wrote:
>
> Hello,
>
> apparently the attached compressed LAZ file does not survive the round trip via libLAS' las2las ... can someone verify (or explain / debug)?
>
> C:\OSGeo4W64\bin\las2las -v paul.laz  --output paul_liblas.laz
>
> E:\LAStools\bin>lasinfo -i paul.laz
> lasinfo (170330) report for paul.laz
> reporting all LAS header entries:
>   file signature:             'LASF'
>   file source ID:             0
>   global_encoding:            0
>   project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
>   version major.minor:        1.2
>   system identifier:          'LAStools (c) by rapidlasso GmbH'
>   generating software:        'txt2las (version 170402)'
>   file creation day/year:     96/2017
>   header size:                227
>   offset to point data:       1451
>   number var. length records: 2
>   point data format:          1
>   point data record length:   35
>   number of point records:    5024
>   number of points by return: 3051 1503 411 57 2
>   scale factor x y z:         0.01 0.01 0.01
>   offset x y z:               4300000 5600000 0
>   min x y z:                  4376272.35 5683751.73 452.29
>   max x y z:                  4376671.84 5683959.33 484.91
> variable length header record 1 of 2:
>   reserved             0
>   user ID              'LASF_Spec'
>   record ID            4
>   length after header  960
>   description          'by LAStools of rapidlasso GmbH'
>     Extra Byte Descriptions
>       data type: 3 (unsigned short), name "echo width", description: "Full width at half maximum [ns]", scale: 0.1, offset: 0 (not set)
>       data type: 4 (short), name "LAS 1.4 scan angle", description: "additional attributes", scale: 0.006, offset: 0 (not set)
>       data type: 1 (unsigned char), name "LAS 1.4 extended returns", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
>       data type: 1 (unsigned char), name "LAS 1.4 classification", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
>       data type: 1 (unsigned char), name "LAS 1.4 flags and channel", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
> variable length header record 2 of 2:
>   reserved             0
>   user ID              'lascompatible'
>   record ID            22204
>   length after header  156
>   description          'by LAStools of rapidlasso GmbH'
> LASzip compression (version 2.5r2 c2 50000): POINT10 2 GPSTIME11 2 BYTE 2
> reporting minimum and maximum for all LAS point record entries ...
>   X             7627235    7667184
>   Y             8375173    8395933
>   Z               45229      48491
>   intensity          10        346
>   return_number       1          5
>   number_of_returns   1          5
>   edge_of_flight_line 0          0
>   scan_direction_flag 0          0
>   classification      0          0
>   scan_angle_rank     0          0
>   user_data           0          0
>   point_source_ID     3          5
>   gps_time 0.000000 0.000000
> number of first returns:        3051
> number of intermediate returns: 470
> number of last returns:         3051
> number of single returns:       1548
> overview over number of returns of given pulse: 1548 2184 1062 220 10 0 0
> histogram of classification of points:
>             5024  never classified (0)
>
> E:\LAStools\bin>lasinfo -i paul_liblas.laz
> lasinfo (170330) report for paul_liblas.laz
> reporting all LAS header entries:
>   file signature:             'LASF'
>   file source ID:             0
>   global_encoding:            0
>   project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
>   version major.minor:        1.2
>   system identifier:          'LAStools (c) by rapidlasso GmbH'
>   generating software:        'txt2las (version 170402)'
>   file creation day/year:     96/2017
>   header size:                227
>   offset to point data:       8774
>   number var. length records: 3
>   point data format:          1
>   point data record length:   35
>   number of point records:    5024
>   number of points by return: 3051 1503 411 57 2
>   scale factor x y z:         0.01 0.01 0.01
>   offset x y z:               4300000 5600000 0
>   min x y z:                  4376272.35 5683751.73 452.29
>   max x y z:                  4376671.84 5683959.33 484.91
> variable length header record 1 of 3:
>   reserved             0
>   user ID              'LASF_Spec'
>   record ID            4
>   length after header  960
>   description          'by LAStools of rapidlasso GmbH'
>     Extra Byte Descriptions
>       data type: 3 (unsigned short), name "echo width", description: "Full width at half maximum [ns]", scale: 0.1, offset: 0 (not set)
>       data type: 4 (short), name "LAS 1.4 scan angle", description: "additional attributes", scale: 0.006, offset: 0 (not set)
>       data type: 1 (unsigned char), name "LAS 1.4 extended returns", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
>       data type: 1 (unsigned char), name "LAS 1.4 classification", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
>       data type: 1 (unsigned char), name "LAS 1.4 flags and channel", description: "additional attributes", scale: 1 (not set), offset: 0 (not set)
> variable length header record 2 of 3:
>   reserved             0
>   user ID              'lascompatible'
>   record ID            22204
>   length after header  156
>   description          'by LAStools of rapidlasso GmbH'
> variable length header record 3 of 3:
>   reserved             43707
>   user ID              'liblas'
>   record ID            7
>   length after header  7269
>   description          'http://liblas.org/schema/'
> LASzip compression (version 2.2r0 c2 50000): POINT10 2 GPSTIME11 2
> reporting minimum and maximum for all LAS point record entries ...
> ERROR: 'end-of-file during chunk with index 0' after 1638 of 5024 points
>   X          -2140398450 2143434216
>   Y          -2141878466 2146152511
>   Z          -2145714721 2146156107
>   intensity           0      65535
>   return_number       0          7
>   number_of_returns   0          7
>   edge_of_flight_line 0          1
>   scan_direction_flag 0          1
>   classification      0         31
>   scan_angle_rank  -128        127
>   user_data           0        254
>   point_source_ID     3      65498
>   gps_time -0.000000 0.000000
> WARNING: range violates GPS week time specified by global encoding bit 0
> WARNING: 1637 points outside of header bounding box
> number of first returns:        467
> number of intermediate returns: 352
> number of last returns:         922
> number of single returns:       391
> WARNING: real number of point records (1638) is different from header entry (5024).
> WARNING: for return 1 real number of points by return (230) is different from header entry (3051).
> WARNING: for return 2 real number of points by return (230) is different from header entry (1503).
> WARNING: for return 3 real number of points by return (193) is different from header entry (411).
> WARNING: for return 4 real number of points by return (189) is different from header entry (57).
> WARNING: for return 5 real number of points by return (188) is different from header entry (2).
> WARNING: there are 237 points with return number 0
> WARNING: there are 180 points with return number 6
> WARNING: there are 191 points with return number 7
> overview over number of returns of given pulse: 182 258 208 223 179 198 181
> WARNING: there are 209 points with a number of returns of given pulse of 0
> histogram of classification of points:
>               67  never classified (0)
>               51  unclassified (1)
>               54  ground (2)
>               55  low vegetation (3)
>               63  medium vegetation (4)
>               64  high vegetation (5)
>               46  building (6)
>               54  noise (7)
>               35  keypoint (8)
>               40  water (9)
>               41  rail (10)
>               54  road surface (11)
>               49  overlap (12)
>               53  wire guard (13)
>               36  wire conductor (14)
>               46  tower (15)
>               62  wire connector (16)
>               41  bridge deck (17)
>               54  Reserved for ASPRS Definition (18)
>               42  Reserved for ASPRS Definition (19)
>               52  Reserved for ASPRS Definition (20)
>               52  Reserved for ASPRS Definition (21)
>               69  Reserved for ASPRS Definition (22)
>               33  Reserved for ASPRS Definition (23)
>               57  Reserved for ASPRS Definition (24)
>               67  Reserved for ASPRS Definition (25)
>               55  Reserved for ASPRS Definition (26)
>               52  Reserved for ASPRS Definition (27)
>               59  Reserved for ASPRS Definition (28)
>               39  Reserved for ASPRS Definition (29)
>               52  Reserved for ASPRS Definition (30)
>               44  Reserved for ASPRS Definition (31)
>  +-> flagged as synthetic: 841
>  +-> flagged as keypoints: 855
>  +-> flagged as withheld:  804
> real max x larger than header max x by 21357670.320000
> real min x smaller than header min x by 21480256.850000
> real max y larger than header max y by 21377565.780000
> real min y smaller than header min y by 21502536.390000
> real max z larger than header max z by 21461076.160000
> real min z smaller than header min z by 21457599.500000
>
> <paul.laz><paul_liblas.laz>_______________________________________________
> Liblas-devel mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/liblas-devel

_______________________________________________
Liblas-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/liblas-devel
Loading...