CRS in LAS 1.2 with Geotiff and WKT

640 views
Skip to first unread message

Jeffrey Osborne

unread,
Jan 23, 2019, 5:46:51 PM1/23/19
to LAStools - efficient tools for LiDAR processing
Hi,

I have las 1.2 data storing the CRS in both the Geotiff keys and in WKT. I was following the interpretation of the LAS spec and Martin's reply here https://groups.google.com/d/msg/lastools/kLZErKZ8XIg/2vyl8nZDAgAJ that storing the CRS in both was allowed for a 1.4 file. I'm wondering now if I incorrectly applied that interpretation to a v1.2 file. The reason I'm questioning this is that a user discovered that this data will not load in ArcGIS 10.5 or newer. It worked in v10.2. Anyone else having problems with LAS 1.2 in ArcGIS 10.5 or newer and which method is most correct to store the CRS?

Here's the lasinfo report: 

lasinfo (190122) report for '268_4881_201118.las'
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
:        'las2las (version 170203)'
  file creation day
/year:     243/2016
  header size
:                227
  offset to point data
:       1276
  number
var. length records: 2
  point data format
:          1
  point data record length
:   28
  number of point records
:    4984108
  number of points
by return: 2694100 1471710 598294 182303 37701
  scale factor x y z
:         0.01 0.01 0.01
  offset x y z
:               200000 4800000 0
  min x y z
:                  268000.00 4881000.00 31.57
  max x y z
:                  269000.00 4882000.00 954.50
variable length header record
1 of 2:
  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 2961 - ProjectedCSTypeGeoKey: NAD83(CSRS) / UTM zone 20N
      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 5114 - VerticalCSTypeGeoKey: VertCS_Canadian_Geodetic_Vertical_Datum_1928
variable length header record
2 of 2:
  reserved            
0
  user ID              
'LASF_Projection'
  record ID            
2112
  length after header  
893
  des

cription          
'by LAStools of rapidlasso GmbH'
    WKT OGC COORDINATE SYSTEM
:
    COMPD_CS
["NAD83(CSRS) / UTM zone 20N + CGVD28",PROJCS["NAD83(CSRS) / UTM zone 20N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2961"]]VERT_CS["CGVD28",VERT_DATUM["Canadian Geodetic Vertical Datum of 1928",2005,AUTHORITY["EPSG","5114"]],UNIT["metre",1.0,AUTHORITY["EPSG","9001"]]AXIS["Gravity-related height",UP],AUTHORITY["EPSG","5713"]]]
reporting minimum
and maximum for all LAS point record entries ...
  X            
6800000    6900000
  Y            
8100000    8200000
  Z                
3157      95450
  intensity          
9       1213
  return_number      
1          5
  number_of_returns  
1          5
  edge_of_flight_line
0          1
  scan_direction_flag
0          0
  classification      
1         18
  scan_angle_rank    
0          0
  user_data          
0          0
  point_source_ID    
2         11
  gps_time
332242.088323 395343.621516
number of first returns
:        2694100
number of intermediate returns
: 818528
number of
last returns:         2693481
number of single returns
:       1222001
overview over number of returns of given pulse
: 1222001 1746804 1248069 578660 188574 0 0
histogram of classification of points
:
         
4580636  unclassified (1)
         
403459  ground (2)
             
13  Reserved for ASPRS Definition (18)



If I leave the WKT and change the global encoding to 16 ArcGIS 10.5 can load the data. 


lasinfo (190122) report for '268_4881_201118_v12_e16.las'
reporting all LAS header entries
:
  file signature
:             'LASF'
  file source ID
:             0
  global_encoding
:            16
  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
:        'las2las (version 170203)'
  file creation day
/year:     243/2016
  header size
:                227
  offset to point data
:       1276
  number
var. length records: 2
  point data format
:          1
  point data record length
:   28
  number of point records
:    4984108
  number of points
by return: 2694100 1471710 598294 182303 37701
  scale factor x y z
:         0.01 0.01 0.01
  offset x y z
:               200000 4800000 0
  min x y z
:                  268000.00 4881000.00 31.57
  max x y z
:                  269000.00 4882000.00 954.50
variable length header record
1 of 2:
  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 2961 - ProjectedCSTypeGeoKey: NAD83(CSRS) / UTM zone 20N
      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 5114 - VerticalCSTypeGeoKey: VertCS_Canadian_Geodetic_Vertical_Datum_1928
variable length header record
2 of 2:
  reserved            
0
  user ID              
'LASF_Projection'
  record ID            
2112
  length after header  
893
  description          
'by LAStools of rapidlasso GmbH'
    WKT OGC COORDINATE SYSTEM
:
    COMPD_CS
["NAD83(CSRS) / UTM zone 20N + CGVD28",PROJCS["NAD83(CSRS) / UTM zone 20N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2961"]]VERT_CS["CGVD28",VERT_DATUM["Canadian Geodetic Vertical Datum of 1928",2005,AUTHORITY["EPSG","5114"]],UNIT["metre",1.0,AUTHORITY["EPSG","9001"]]AXIS["Gravity-related height",UP],AUTHORITY["EPSG","5713"]]]
reporting minimum
and maximum for all LAS point record entries ...
  X            
6800000    6900000
  Y            
8100000    8200000
  Z                
3157      95450
  intensity          
9       1213
  return_number      
1          5
  number_of_returns  
1          5
  edge_of_flight_line
0          1
  scan_direction_flag
0          0
  classification      
1         18
  scan_angle_rank    
0          0
  user_data          
0          0
  point_source_ID    
2         11
  gps_time
332242.088323 395343.621516
number of first returns
:        2694100
number of intermediate returns
: 818528
number of
last returns:         2693481
number of single returns
:       1222001
overview over number of returns of given pulse
: 1222001 1746804 1248069 578660 188574 0 0
histogram of classification of points
:
         
4580636  unclassified (1)
         
403459  ground (2)
             
13  Reserved for ASPRS Definition (18)





If I leave the encoding set to 0 and remove the WKT ArcGIS 10.5 will not load it even though that looks to me to be compliant to the 1.2 spec. 

lasinfo (190122) report for '268_4881_201118_no_wkt.las'
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
:        'las2las (version 190114)'
  file creation day
/year:     243/2016
  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
:    4984108
  number of points
by return: 2694100 1471710 598294 182303 37701
  scale factor x y z
:         0.01 0.01 0.01
  offset x y z
:               200000 4800000 0
  min x y z
:                  268000.00 4881000.00 31.57
  max x y z
:                  269000.00 4882000.00 954.50
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 2961 - ProjectedCSTypeGeoKey: NAD83(CSRS) / UTM zone 20N
      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 5114 - VerticalCSTypeGeoKey: VertCS_Canadian_Geodetic_Vertical_Datum_1928
reporting minimum
and maximum for all LAS point record entries ...
  X            
6800000    6900000
  Y            
8100000    8200000
  Z                
3157      95450
  intensity          
9       1213
  return_number      
1          5
  number_of_returns  
1          5
  edge_of_flight_line
0          1
  scan_direction_flag
0          0
  classification      
1         18
  scan_angle_rank    
0          0
  user_data          
0          0
  point_source_ID    
2         11
  gps_time
332242.088323 395343.621516
number of first returns
:        2694100
number of intermediate returns
: 818528
number of
last returns:         2693481
number of single returns
:       1222001
overview over number of returns of given pulse
: 1222001 1746804 1248069 578660 188574 0 0
histogram of classification of points
:
         
4580636  unclassified (1)
         
403459  ground (2)
             
13  Reserved for ASPRS Definition (18)





LAS12_Geotiff_and_WKT_lasinfo.txt

Martin Isenburg

unread,
Jan 25, 2019, 4:04:29 AM1/25/19
to LAStools - efficient command line tools for LIDAR processing
Hello,

The global encoding bit number 4 (the "WKT bit") that sets the value of the global encoding field to 16 (or higher) was not introduced until LAS version 1.4:


Your LAS file has version 1.2. For LAS 1.2 files the default that defines the CRS is the GeoTIFF and only for LAS 1.4 files the "WKT bit" should become meaningful. In LAStools I am less strict about that and simply try to first read the CRS from the OGC WKT string and - if that fails - look for GeoTIFF tags. Personally I still prefer the more concise GeoTIFF tags although I realize they have some limitations when it comes to vertical datums and exotic CRS ... (-:

Someone who uses the Arghhh will have to help you here ...

Regards,

Martin @rapidlasso

Jeffrey Osborne

unread,
Feb 1, 2019, 11:05:03 AM2/1/19
to LAStools - efficient tools for LiDAR processing
I have a ticket open with ESRI so I'll have to see what their response is. Funnily enough the first example works in ArcGIS Pro but not ArcMap/Scene. Still strange why removing the WKT bit doesn't work since that is to spec and it works in prior versions. Thanks,

Jeffrey...@novascotia.ca

unread,
Mar 23, 2021, 1:11:53 PM3/23/21
to LAStools - efficient tools for LiDAR processing
Hi Martin,  is there an option to clear the global encoding bit for a file where it is already set such as mine? I've removed the wkt vlr in the las v 1.2 file but the global encoding field value is still 16 and I need a way to change it. In las2las I only see -set_global_encoding_gps_bit, looks like I need a -set_global_encoding_wkt_bit command.

Thanks

Martin Isenburg

unread,
Mar 25, 2021, 6:39:17 AM3/25/21
to LAStools - efficient command line tools for LIDAR processing
Hello,

you can do this in place with lasinfo using option '-set_global_encoding 1'. This will turn off all bits except the lowest bit 0. There is no option to turn off only one bit without affecting the others. I should add that. Furthermore you could add option '-nc' which avoids reading the point block part of the LAZ or LAS file and only looks at the header. Because the change is done in place this is much faster than doing it with las2las.

Regards,

Martin

---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/26276478-0fe3-4531-9469-af61602f4b2an%40googlegroups.com.

Jeffrey...@novascotia.ca

unread,
Mar 25, 2021, 1:35:48 PM3/25/21
to LAStools - efficient tools for LiDAR processing
Ah yeas I forgot about lasinfo. That does it, thank-you
Reply all
Reply to author
Forward
0 new messages