We are pleased to announce that PROJ has been integrated into LAStools, enhancing the capabilities of geodesic calculations, cartographic projections, and coordinate transformations in LAStools. PROJ is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another, including cartographic projections as well as geodetic transformations. It is used in las2las to transform LiDAR data between different coordinate reference systems and in lasinfo to access detailed representations and information about CRS.
Key features include:
- Transformation of point clouds between different CRS.
- Conversion and representation of CRS in various formats (EPSG, WKT, PROJ string, PROJJSON).
- Retrieval of metadata such as ellipsoids, axes, and datum information related to a CRS.
The integration of the PROJ library provides a flexible and powerful way to perform geodetic transformations directly in LAStools.on of the PROJ library offers a flexible and powerful way to perform geodetic transformations directly in LAStools.
Installing the PROJ Library
PROJ is not mandatory to run LAStools. However, if you want to perform geodetic calculations with PROJ it must be available on your system. Many other GIS software like QGIS or GDAL use PROJ, so it is probably already installed on your system. If not, there are several methods to install it:
- Install QGIS
QGIS comes with a simple installer and PROJ is installed by default. - Installation via Package Managers
There are numerous ways to install PROJ using a package manager. For installation information, see our reference documentation.
Post installation steps:
If PROJ was installed with QGIS, it should be found by LAStools by default. Otherwise/optionally, the path to PROJ can be defined.
Using PROJ with LAStools
A) Reprojecting using las2las64
To transform between different Coordinate Reference Systems (CRSs) las2las is used with the argument ‚-proj_epsg‘.
las2las64 -i in.laz -o out.laz -proj_epsg 32633 4326
This command will transform the input LAZ file from EPSG code 32633 to an output file with EPSG code 4326. Specifying the source CRS is optional for all commands. If no source CRS is specified, the tool will attempt to extract this information from the header of the input file ‚in.laz‘, which is recommended. There is a hierarchy for determining the source CRS for the PROJ transformation:There is a hierarchy for determining the source CRS for the PROJ transformation:
- the source CRS is passed as an argument.
- if not, the WKT is searched for in the header of the source file.
- if no WKT is available, it is generated from the GeoTIFF data.
- if this is not possible, the EPSG code from the GeoTIFF is used, which can lead to inaccuracies as GeoTIFF arguments could be ignored.
Files with CompoundCRS are not yet supported for transformations using PROJ in LAStools. The recommended methods for specifying CRSs are the use of EPSG codes or WKT representations, as these adhere to well-defined standards:
las2las64 -i in.laz -o out.laz -proj_epsg 32633 4326
las2las64 -i in.laz -o out.laz -proj_wkt filename_source_wkt filename_target_wkt
The methods using the json representation or the PROJ string are only recommended for advanced and experienced users. When using the PROJ string, a single PROJ string can also be used directly to describe the transformation or operation.
las2las64 -i in.laz -o out.laz -proj_json filename_source_json filename_target_json
las2las64 -i in.laz -o out.laz -proj_string "proj_string_source" "proj_string_target"
B) Fetching projection information using lasinfo64
Querying CRS representations and information based on the input file. There are several ways to format the fetched information. The [wkt] WKT representation, the [js] PROJJSON representation, the [str] PROJ string, the [epsg] EPSG code, the [el] ellipsoid information, the [datum] datum information and the [cs] coordinate system information can be queried.
!!Cautious!! If a CRS object (VLR) was not created from a PROJ string, exporting to a PROJ string [str] will in most cases result in a loss of information. This can potentially lead to incorrect transformations. The use of PROJ strings should only be done with advanced knowledge.
Example:
lasinfo64 -i in.laz -proj_info wkt
will return the projection information stored in the VLR as WKT:
PROJ Coordinate Reference System (CRS) Representation and Information
WKT representation of the CRS:
PROJCRS["NAD83(2011) / UTM zone 15N",BASEGEOGCRS["NAD83(2011)",DATUM["NAD83 (2011)",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1],ID["EPSG",7019]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["UTM zone 15N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["False easting",500000,LENGTHUNIT["Meter",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["Meter",1],ID["EPSG",8807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",-93,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],ID["EPSG",16015]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["Meter",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["Meter",1,ID["EPSG",9001]]]]
where
lasinfo64 -i in.laz -proj_info el
results to
PROJ Coordinate Reference System (CRS) Representation and Information
the PROJ ellipsoid object was successfully created
Ellipsoid of the CRS:
Semi-Major Axis: 6378137.000 meters
Semi-Minor Axis: 6356752.314 meters (computed)
Inverse Flattening: 298.257222
overview over extended number of returns of given pulse: 5449753 3342506 914547
Note
Ensure that the version of the PROJ data matches the version of the PROJ library to avoid compatibility issues. For more information and detailed instructions about the installation, refer to the official PROJ installation page.
License
las2las64 is free to use.
las2las and lasinfo are open-source and free to use. PROJ is released under the X/MIT open-source license. For more information about the license and usage of the PROJ library, refer to the official PROJ repository or the official website.