riegl extra byte to user data

251 views
Skip to first unread message

Luka Šolar

unread,
Jul 18, 2017, 7:54:54 PM7/18/17
to LAStools - efficient tools for LiDAR processing
Hi
I would like to store value of extra byte (in my case echo width) to user data and then delete extra byte. Is thhis possible in one step or using las2txt with parsing and then lasmerge with las and txt file

Thank you for the help

regards
Luka


linija_21040.txt

Martin Isenburg

unread,
Jul 19, 2017, 11:58:05 AM7/19/17
to LAStools - efficient command line tools for LIDAR processing
Hello,

the copying of extra bytes into the user data field has been implemented and should be able to accomplished with the transform '-copy_attribute_into_user_data 1' but the "extra attribute" does not get deleted yet. Not sure this is really a good idea. What is the reason for this copy and delete of this extra attribute?

Martin

----------

E:\LAStools\bin>las2las -i "e:\LAS14\PRDF6\RIEGL_LMS-Q1560 - Channel 1 - 141210_121159_1.las" -copy_attribute_into_user_data 1 -o test.las

E:\LAStools\bin>lasinfo -i test.las
lasinfo (170718) report for test.las
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            17
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.4
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'las2las (version 170718)'
  file creation day/year:     253/2016
  header size:                375
  offset to point data:       2078
  number var. length records: 5
  point data format:          6
  point data record length:   34
  number of point records:    0
  number of points by return: 0 0 0 0 0
  scale factor x y z:         0.001 0.001 0.001
  offset x y z:               548858 5390041 356
  min x y z:                  548836.701 5390027.164 336.585
  max x y z:                  549052.648 5390159.866 376.435
  start of waveform data packet record: 0
  start of first extended variable length record: 0
  number of extended_variable length records: 0
  extended number of point records: 381549
  extended number of points by return: 225742 100584 43046 10515 1510 143 8 1 0 0 0 0 0 0 0
variable length header record 1 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  208
  description          'GeoKeyDirectoryTag (mandatory)'
    GeoKeyDirectoryTag version 1.1.0 number of keys 25
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 1025 tiff_tag_location 0 count 1 value_offset 2 - GTRasterTypeGeoKey: RasterPixelIsPoint
      key 1026 tiff_tag_location 34737 count 22 value_offset 0 - GTCitationGeoKey: WGS 84 / UTM zone 33N
      key 2048 tiff_tag_location 0 count 1 value_offset 32767 - GeographicTypeGeoKey: user-defined
      key 2049 tiff_tag_location 34737 count 6 value_offset 44 - GeogCitationGeoKey: WGS84
      key 2050 tiff_tag_location 0 count 1 value_offset 32767 - GeogGeodeticDatumGeoKey: user-defined
      key 2051 tiff_tag_location 0 count 1 value_offset 32767 - GeogPrimeMeridianGeoKey: user-defined
      key 2052 tiff_tag_location 0 count 1 value_offset 9001 - GeogLinearUnitsGeoKey: Linear_Meter
      key 2054 tiff_tag_location 0 count 1 value_offset 9102 - GeogAngularUnitsGeoKey: Angular_Degree
      key 2056 tiff_tag_location 0 count 1 value_offset 32767 - GeogEllipsoidGeoKey: user-defined
      key 2057 tiff_tag_location 34736 count 1 value_offset 0 - GeogSemiMajorAxisGeoKey: 6378137
      key 2059 tiff_tag_location 34736 count 1 value_offset 1 - GeogInvFlatteningGeoKey: 298.2572236
      key 2060 tiff_tag_location 0 count 1 value_offset 9102 - GeogAzimuthUnitsGeoKey: Angular_Degree
      key 2061 tiff_tag_location 34736 count 1 value_offset 2 - GeogPrimeMeridianLongGeoKey: 0
      key 3072 tiff_tag_location 0 count 1 value_offset 32767 - ProjectedCSTypeGeoKey: user-defined
      key 3073 tiff_tag_location 34737 count 22 value_offset 22 - PCSCitationGeoKey: WGS 84 / UTM zone 33N
      key 3074 tiff_tag_location 0 count 1 value_offset 32767 - ProjectionGeoKey: user-defined
      key 3075 tiff_tag_location 0 count 1 value_offset 1 - ProjCoordTransGeoKey: CT_TransverseMercator
      key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
      key 3080 tiff_tag_location 34736 count 1 value_offset 4 - ProjNatOriginLongGeoKey: 15
      key 3081 tiff_tag_location 34736 count 1 value_offset 3 - ProjNatOriginLatGeoKey: 0
      key 3082 tiff_tag_location 34736 count 1 value_offset 5 - ProjFalseEastingGeoKey: 500000
      key 3083 tiff_tag_location 34736 count 1 value_offset 6 - ProjFalseNorthingGeoKey: 0
      key 3092 tiff_tag_location 34736 count 1 value_offset 7 - ProjScaleAtNatOriginGeoKey: 0.9996
      key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
variable length header record 2 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34736
  length after header  64
  description          'GeoDoubleParamsTag (optional)'
    GeoDoubleParamsTag (number of doubles 8)
      6.37814e+006 298.257 0 0 15 500000 0 0.9996
variable length header record 3 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34737
  length after header  50
  description          'GeoASCIIParamsTag (optional)'
    GeoAsciiParamsTag (number of characters 50)
      WGS 84 / UTM zone 33N|WGS 84 / UTM zone 33N|WGS84|
variable length header record 4 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            2112
  length after header  727
  description          'OGC COORDINATE SYSTEM WKT'
    WKT OGC COORDINATE SYSTEM:
    PROJCS["WGS 84 / UTM zone 33N",GEOGCS["WGS 84 / UTM zone 33N",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["
EPSG","6326"]],PRIMEM["Greenwich",0.0000000000000000,AUTHORITY["EPSG","8901"]],UNIT["Degree",0.01745329252000000012,AUTHORITY["EPSG","9102"]],AUTHORITY["EPSG","
32633"]],UNIT["Meter",1.00000000000000000000,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.0000000000000000],PARA
METER["central_meridian",14.9999999999999982],PARAMETER["scale_factor",0.9996000000000000],PARAMETER["false_easting",500000.000],PARAMETER["false_northing",0.00
0],AXIS["Easting",EAST],AXIS["Northing",NORTH],AXIS["Height",UP],AUTHORITY["EPSG","32633"]]
variable length header record 5 of 5:
  reserved             43707
  user ID              'LASF_Spec'
  record ID            4
  length after header  384
  description          'RIEGL Extra Bytes'
    Extra Byte Descriptions
      data type: 3 (unsigned short), name "Amplitude", description: "Echo signal amplitude [dB]", min: 0, max: 10000, scale: 0.01, offset: 0 (not set)
      data type: 3 (unsigned short), name "Pulse width", description: "Full width at half maximum [ns]", min: 1, max: 10000, scale: 0.1, offset: 0 (not set)
reporting minimum and maximum for all LAS point record entries ...
  X              -21299     194648
  Y              -13836     118866
  Z              -19415      20435
  intensity       15641      50309
  return_number       1          7
  number_of_returns   1          7
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      2          4
  scan_angle_rank     4         26
  user_data           1         97
  point_source_ID     0          0
  gps_time 1525170343.018734 1525170346.458754
  extended_return_number          1      8
  extended_number_of_returns      1      8
  extended_classification         2      4
  extended_scan_angle           667   4333
  extended_scanner_channel        0      0
number of first returns:        225742
number of intermediate returns: 54847
number of last returns:         226430
number of single returns:       125470
overview over extended number of returns of given pulse: 125470 115361 97197 35909 6762 793 49 8 0 0 0 0 0 0 0
histogram of classification of points:
          165894  ground (2)
          215655  medium vegetation (4)


E:\LAStools\bin>lasinfo -i "e:\LAS14\PRDF6\RIEGL_LMS-Q1560 - Channel 1 - 141210_121159_1.las"
lasinfo (170718) report for e:\LAS14\PRDF6\RIEGL_LMS-Q1560 - Channel 1 - 141210_121159_1.las
reporting all LAS header entries:
  file signature:             'LASF'
  file source ID:             0
  global_encoding:            17
  project ID GUID data 1-4:   00000000-0000-0000-0000-000000000000
  version major.minor:        1.4
  system identifier:          'EXTRACTION'
  generating software:        'RiPROCESS 1.8.1'
  file creation day/year:     253/2016
  header size:                375
  offset to point data:       2078
  number var. length records: 5
  point data format:          6
  point data record length:   34
  number of point records:    381549
  number of points by return: 225742 100584 43046 10515 1510
  scale factor x y z:         0.001 0.001 0.001
  offset x y z:               548858 5390041 356
  min x y z:                  548836.700 5390027.160 336.580
  max x y z:                  549052.650 5390159.870 376.440
  start of waveform data packet record: 0
  start of first extended variable length record: 0
  number of extended_variable length records: 0
  extended number of point records: 381549
  extended number of points by return: 225742 100584 43046 10515 1510 143 8 1 0 0 0 0 0 0 0
variable length header record 1 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  208
  description          'GeoKeyDirectoryTag (mandatory)'
    GeoKeyDirectoryTag version 1.1.0 number of keys 25
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 1025 tiff_tag_location 0 count 1 value_offset 2 - GTRasterTypeGeoKey: RasterPixelIsPoint
      key 1026 tiff_tag_location 34737 count 22 value_offset 0 - GTCitationGeoKey: WGS 84 / UTM zone 33N
      key 2048 tiff_tag_location 0 count 1 value_offset 32767 - GeographicTypeGeoKey: user-defined
      key 2049 tiff_tag_location 34737 count 6 value_offset 44 - GeogCitationGeoKey: WGS84
      key 2050 tiff_tag_location 0 count 1 value_offset 32767 - GeogGeodeticDatumGeoKey: user-defined
      key 2051 tiff_tag_location 0 count 1 value_offset 32767 - GeogPrimeMeridianGeoKey: user-defined
      key 2052 tiff_tag_location 0 count 1 value_offset 9001 - GeogLinearUnitsGeoKey: Linear_Meter
      key 2054 tiff_tag_location 0 count 1 value_offset 9102 - GeogAngularUnitsGeoKey: Angular_Degree
      key 2056 tiff_tag_location 0 count 1 value_offset 32767 - GeogEllipsoidGeoKey: user-defined
      key 2057 tiff_tag_location 34736 count 1 value_offset 0 - GeogSemiMajorAxisGeoKey: 6378137
      key 2059 tiff_tag_location 34736 count 1 value_offset 1 - GeogInvFlatteningGeoKey: 298.2572236
      key 2060 tiff_tag_location 0 count 1 value_offset 9102 - GeogAzimuthUnitsGeoKey: Angular_Degree
      key 2061 tiff_tag_location 34736 count 1 value_offset 2 - GeogPrimeMeridianLongGeoKey: 0
      key 3072 tiff_tag_location 0 count 1 value_offset 32767 - ProjectedCSTypeGeoKey: user-defined
      key 3073 tiff_tag_location 34737 count 22 value_offset 22 - PCSCitationGeoKey: WGS 84 / UTM zone 33N
      key 3074 tiff_tag_location 0 count 1 value_offset 32767 - ProjectionGeoKey: user-defined
      key 3075 tiff_tag_location 0 count 1 value_offset 1 - ProjCoordTransGeoKey: CT_TransverseMercator
      key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
      key 3080 tiff_tag_location 34736 count 1 value_offset 4 - ProjNatOriginLongGeoKey: 15
      key 3081 tiff_tag_location 34736 count 1 value_offset 3 - ProjNatOriginLatGeoKey: 0
      key 3082 tiff_tag_location 34736 count 1 value_offset 5 - ProjFalseEastingGeoKey: 500000
      key 3083 tiff_tag_location 34736 count 1 value_offset 6 - ProjFalseNorthingGeoKey: 0
      key 3092 tiff_tag_location 34736 count 1 value_offset 7 - ProjScaleAtNatOriginGeoKey: 0.9996
      key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
variable length header record 2 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34736
  length after header  64
  description          'GeoDoubleParamsTag (optional)'
    GeoDoubleParamsTag (number of doubles 8)
      6.37814e+006 298.257 0 0 15 500000 0 0.9996
variable length header record 3 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34737
  length after header  50
  description          'GeoASCIIParamsTag (optional)'
    GeoAsciiParamsTag (number of characters 50)
      WGS 84 / UTM zone 33N|WGS 84 / UTM zone 33N|WGS84|
variable length header record 4 of 5:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            2112
  length after header  727
  description          'OGC COORDINATE SYSTEM WKT'
    WKT OGC COORDINATE SYSTEM:
    PROJCS["WGS 84 / UTM zone 33N",GEOGCS["WGS 84 / UTM zone 33N",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["
EPSG","6326"]],PRIMEM["Greenwich",0.0000000000000000,AUTHORITY["EPSG","8901"]],UNIT["Degree",0.01745329252000000012,AUTHORITY["EPSG","9102"]],AUTHORITY["EPSG","
32633"]],UNIT["Meter",1.00000000000000000000,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.0000000000000000],PARA
METER["central_meridian",14.9999999999999982],PARAMETER["scale_factor",0.9996000000000000],PARAMETER["false_easting",500000.000],PARAMETER["false_northing",0.00
0],AXIS["Easting",EAST],AXIS["Northing",NORTH],AXIS["Height",UP],AUTHORITY["EPSG","32633"]]
variable length header record 5 of 5:
  reserved             43707
  user ID              'LASF_Spec'
  record ID            4
  length after header  384
  description          'RIEGL Extra Bytes'
    Extra Byte Descriptions
      data type: 3 (unsigned short), name "Amplitude", description: "Echo signal amplitude [dB]", min: 0, max: 10000, scale: 0.01, offset: 0 (not set)
      data type: 3 (unsigned short), name "Pulse width", description: "Full width at half maximum [ns]", min: 1, max: 10000, scale: 0.1, offset: 0 (not set)
reporting minimum and maximum for all LAS point record entries ...
  X              -21299     194648
  Y              -13836     118866
  Z              -19415      20435
  intensity       15641      50309
  return_number       1          7
  number_of_returns   1          7
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      2          4
  scan_angle_rank     4         26
  user_data           0          0
  point_source_ID     0          0
  gps_time 1525170343.018734 1525170346.458754
  extended_return_number          1      8
  extended_number_of_returns      1      8
  extended_classification         2      4
  extended_scan_angle           667   4333
  extended_scanner_channel        0      0
number of first returns:        225742
number of intermediate returns: 54847
number of last returns:         226430
number of single returns:       125470
WARNING: point type is 6 but (legacy) number of point records in header is 381549 instead zero.
WARNING: point type is 6 but (legacy) number of points by return [1] in header is 225742 instead zero.
WARNING: point type is 6 but (legacy) number of points by return [2] in header is 100584 instead zero.
WARNING: point type is 6 but (legacy) number of points by return [3] in header is 43046 instead zero.
WARNING: point type is 6 but (legacy) number of points by return [4] in header is 10515 instead zero.
WARNING: point type is 6 but (legacy) number of points by return [5] in header is 1510 instead zero.
overview over extended number of returns of given pulse: 125470 115361 97197 35909 6762 793 49 8 0 0 0 0 0 0 0
histogram of classification of points:
          165894  ground (2)
          215655  medium vegetation (4)

Luka Šolar

unread,
Aug 22, 2017, 1:34:28 AM8/22/17
to LAStools - efficient tools for LiDAR processing
Hi

I have tried to copy value from extra byte to user data with -copy_attribute_into_user_data 1, but results in lasinfo are the same.
In attachment is also pic from terrascan with echo lenght value

Regards

Luka

Dne sreda, 19. julij 2017 01.54.54 UTC+2 je oseba Luka Šolar napisala:
21010.txt
21010_1.txt
terrascan.png

Martin Isenburg

unread,
Aug 22, 2017, 7:24:42 AM8/22/17
to LAStools - efficient command line tools for LIDAR processing
Hello,

The answer is easy. The enumeration of additional attributes starts at 0, not at 1. Hence the same attempt with las2las but using this option here instread:

-copy_attribute_into_user_data 0

should work just fine.


Regards,

Martin @rapidlasso

Reply all
Reply to author
Forward
0 new messages