-
Notifications
You must be signed in to change notification settings - Fork 19
Aligning polygons and point clouds
The most important requirement for the polygon-point cloud reconstruction to work is to have the two datasets aligned, i.e. have them in the same coordinate reference system (CRS), typically defined with a certain EPSG code.
This section of the documentation will lead you through the steps necessary to verify, and eventually fix, the alignment of your datasets.
Start by dragging your datasets into the software QGIS (it is free, (download link)[https://qgis.org]), both polygons and point cloud in LAS/LAZ format. To check the CRS of the layer, double-click on it (which opens up "Layer Properties") and look at the information.
Pay attention to units. There is a good chance you will need them in meters. To check how your layers look in their own projection, make sure your layer CRS and project CRS are the same.
The project CRS is written at the bottom-right of the window. To change it, you can click on it and type in the new CRS, or you can right-click on the layer and choose Layer CRS -> Set Project CRS from Layer
If your polygons and point cloud are visually not aligned in QGIS, it means one (or even both) of them are not imported into the program correctly, i.e. in a wrong CRS. Notice that in the first figure below both polygon and point cloud layers are set as visible. However, we can only see polygons. The second figure below shows properly aligned datasets.
To fix this, you might have to do a bit of guesswork by changing the layer's source CRS:
Once you have the alignment right, you can use the reprojection tool to fix the data. Find it in Vector -> Data Management Tools -> Reproject Layer...
Note: It is good practice to double-check the CRS when importing layers. The website/entity that provides the dataset often gives out the information.
By changing the project CRS, you can check how your layers look in different projections -- this is just visualization, layer CRS' are the ones that matter for reconstruction. In case you have to change the CRS of a polygon, check the last figure in the Polygon section of the documentation.
To change the CRS of the point cloud, we recommend you use the las2las utility of LAStools. If you compiled City4CFD from the source, the utility is located in thirdparty/LAStools/bin64/las2las64
. Otherwise, you have to compile LAStools yourself which is pretty simple and straightforward. To transform the point cloud, type:
/path/to/city4cfd/thirdparty/LAStools/bin64/las2las64 -i input_file.laz -target_epsg xxxx -o output_file.laz
If the point cloud is missing CRS information (it will say 'unknown' in QGIS), you can set it with -epsg
flag, e.g.
/path/to/city4cfd/thirdparty/LAStools/bin64/las2las64 -i input_file.laz -epsg xxxx -target_epsg xxxx -o output_file.laz
Our suggestion would be to first look at the CRS of the point cloud. They are typically localized and therefore stored in CRS that most faithfully describes relations in the scanned region. Otherwise, you can do a location search (typically a country) at https://epsg.io.
Your datasets should ideally be in a local CRS (with units in meters), and you should avoid having them in latitude-longitude (EPSG:4326 is to be avoided!).
Copyright (c) 2021-2024 3D Geoinformation, Delft University of Technology