I have a .las point cloud data file that I am trying to get the vlr data from. I have found this link - Update EVLR header info for .LAS file using laspy and have read the docs on Laspy - https://pythonhosted.org/laspy/header.html
It seems like the header vlrs should return a variable length record if it exists.
las_file =laspy.file.File(file.las, mode = "r-") hdr = las_file.header hformat = hdr.header_format for spec in hformat: print(spec.name, spec.offs, spec.num) inVLRs = hdr.vlrs print(inVLRs) vlr_count = len(inVLRs) # OGC Coordinate System WKT print(hdr.max, hdr.version, vlr_count)
I never get anything back for the vlrs. I get all other header info without an issue. Sample file here.
When I use WhiteBoxTools - I do get the correct VLR info. - https://pypi.org/project/whitebox/
Am I using the correct method to get vlrs?