Skip to content

header_get_wktcs: Can't read CRS from header #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cstepper opened this issue Mar 27, 2025 · 2 comments
Open

header_get_wktcs: Can't read CRS from header #74

cstepper opened this issue Mar 27, 2025 · 2 comments

Comments

@cstepper
Copy link

las_header.zip

Hi,
attached is my Header from a LAZ files i want to process.
Unfortunately I can't extract the CRS from the header, as the "WKT OGC COORDINATE SYSTEM" is in the liblas slot, which is not
browsed in header_get_wktcs.

Not sure, if my LAZ file is correct WRT laz standards, but it was directly exported from Pix4D Mapper.

Coud the liblas be integrated to the function?

las_header = readRDS(fs::path(Sys.getenv("HOME"),"las_header.rds"))
header = as.list(las_header)
#> Loading required package: lidR
header[["Variable Length Records"]] |> str(max.level = 2)
#> List of 3
#>  $ WKT OGC CS:List of 5
#>   ..$ reserved           : int 0
#>   ..$ user ID            : chr "LASF_Projection"
#>   ..$ record ID          : int 4224
#>   ..$ length after header: int 2243
#>   ..$ description        : chr "WKT2 VLR"
#>  $ liblas    :List of 6
#>   ..$ reserved                 : int 0
#>   ..$ user ID                  : chr "LASF_Projection"
#>   ..$ record ID                : int 2112
#>   ..$ length after header      : int 737
#>   ..$ description              : chr "OGC Transformation Record"
#>   ..$ WKT OGC COORDINATE SYSTEM: chr "COMPD_CS[\"ETRS89 / UTM zone 32N + DHHN2016 height\",PROJCS[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"| __truncated__
#>  $ NA        :List of 5
#>   ..$ reserved           : int 0
#>   ..$ user ID            : chr "liblas"
#>   ..$ record ID          : int 2112
#>   ..$ length after header: int 737
#>   ..$ description        : chr "OGR variant of OpenGIS WKT SRS"

Created on 2025-03-27 with reprex v2.1.1

@Jean-Romain
Copy link
Collaborator

This does not respect the standard and is thus not read by header_get_wtkcs. But nothing prevent you to extract the WKT manually.

@cstepper
Copy link
Author

This is what I did :). I will double check with Pix4D. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants