Loss of vertical datum after reprojection with las2las

166 views
Skip to first unread message

Gaute Solaas

unread,
Oct 14, 2016, 4:13:18 AM10/14/16
to LAStools - efficient tools for LiDAR processing
Hi,
We're reprojecting laz-files from epsg 25832, 25833 and 25835 to a range of local epsgs. using a Call to las2las built like this:
las2lasProto = '"' + os.path.join(lasBinFolder, r'las2las.exe') + '" -v -i "LAZFILENAMEIN" -o "LAZFILENAMEOUT" -epsg INEPSG -target_epsg OUTEPSG'
followed by a text-substitution to fill in the critical info.
In this reprojection we loose the Identity of the vertical datum.
As you can see there is no tag 4097 in the output file.
How can we Ensure that this info is propagated to the output file?

Cheers,
Gaute

Here's an example as reported by lasinfo:
Input file:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  64
  description          'by LAStools of rapidlasso GmbH'
    GeoKeyDirectoryTag version 1.1.0 number of keys 7
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 25832 - ProjectedCSTypeGeoKey: ETRS89 / UTM 32N
      key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
      key 3073 tiff_tag_location 34737 count 44 value_offset 0 - PCSCitationGeoKey: UTM sone 32, basert på EUREF89 (ETRS89/UTM)
      key 4096 tiff_tag_location 0 count 1 value_offset 5941 - VerticalCSTypeGeoKey: look-up for 5941 not implemented
      key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
      key 4097 tiff_tag_location 34737 count 7 value_offset 44 - VerticalCitationGeoKey: NN2000
the header is followed by 2 user-defined bytes

Output file:
  reserved             43707
  user ID              'LASF_Projection'
  record ID            34735
  length after header  40
  description          'by LAStools of rapidlasso GmbH'
    GeoKeyDirectoryTag version 1.1.0 number of keys 4
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 5105 - ProjectedCSTypeGeoKey: ETRS89 / NTM zone 5
      key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
      key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
the header is followed by 2 user-defined bytes

Martin Isenburg

unread,
Oct 14, 2016, 10:56:43 AM10/14/16
to LAStools - efficient command line tools for LIDAR processing
Hello,

when you are re-projecting (only on the same horizontal datum!!!) then you also need to set the vertical datum again (for the few datums that are supported). It seems you have an older version of LAStools because the NN2000 is only supported in more recent versions.


Note that the GeoTIFF tag 4097 is merely referring to a textual (human-readable) string that spells out the name of the vertical datum. The relevant (machine-readable) GeoTIFF tag is 4096 and the value 5941 for NN2000 was not supported in your older version of LAStools.


Below is an example (that makes no actual sense) of how to use the relatively new option '-vertical_nn2000' that adds GeoTIFF tag 4096 with value 5941 to specify NN2000.

Regards,

Martin @rapidlasso

E:\LAStools\bin>las2las -i ..\data\fusa.laz ^
                                       -target_epsg 25832 ^
                                       -vertical_nn2000 ^
                                       -o poopypoop.laz

E:\LAStools\bin>lasinfo poopypoop.laz
lasinfo (160921) report for poopypoop.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.1
  system identifier:          'LAStools (c) by rapidlasso GmbH'
  generating software:        'las2las (version 161004)'
  file creation day/year:     40/2010
  header size:                227
  offset to point data:       329
  number var. length records: 1
  point data format:          1
  point data record length:   28
  number of point records:    277573
  number of points by return: 263413 13879 281 0 0
  scale factor x y z:         0.01 0.01 0.01
  offset x y z:               11500000 -19800000 0
  min x y z:                  11547909.99 -19854595.57 42.21
  max x y z:                  11550165.02 -19850503.42 64.35
variable length header record 1 of 1:
  reserved             0
  user ID              'LASF_Projection'
  record ID            34735
  length after header  48
  description          'by LAStools of rapidlasso GmbH'
    GeoKeyDirectoryTag version 1.1.0 number of keys 5
      key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
      key 3072 tiff_tag_location 0 count 1 value_offset 25832 - ProjectedCSTypeGeoKey: ETRS89 / UTM 32N
      key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
      key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
      key 4096 tiff_tag_location 0 count 1 value_offset 5941 - VerticalCSTypeGeoKey: Norway Normal Null 2000
LASzip compression (version 2.4r1 c2 50000): POINT10 2 GPSTIME11 2
reporting minimum and maximum for all LAS point record entries ...
  X             4790999    5016502
  Y            -5459557   -5050342
  Z                4221       6435
  intensity          10      62293
  return_number       1          3
  number_of_returns   1          3
  edge_of_flight_line 0          0
  scan_direction_flag 0          0
  classification      1          6
  scan_angle_rank    79        103
  user_data           0        197
  point_source_ID     1          1
  gps_time 5880.963028 5886.739738
number of first returns:        263413
number of intermediate returns: 283
number of last returns:         263370
number of single returns:       249493
overview over number of returns of given pulse: 249493 27232 848 0 0 0 0
histogram of classification of points:
           17553  unclassified (1)
          180868  ground (2)
           37030  high vegetation (5)
           42122  building (6)


Gaute Solaas

unread,
Oct 17, 2016, 4:07:24 AM10/17/16
to LAStools - efficient tools for LiDAR processing
Perfect!
You seem always to be one step Ahead of my troubles ;)
Gaute 

Reply all
Reply to author
Forward
0 new messages