Automatically Extracting Z Coordinates from ASC
Automatically Extracting Z Coordinates from ASC
Hey, I'm just getting to know CC. I have asc, las, xyz files from LIDAR in the coordinate system EPSG: 2177. I also have X, Y coordinates in the same coordinate system and would like to acquire the Z coordinate. I know I can use 'point picking' but there are a lot of these points. Is there a function that will automatically find the Z coordinate for X and Y?
Re: Automatically Extracting Z Coordinates from ASC
So if I understand you correctly, you want to find the Z coordinate of some points for which you only know X and Y? And do you know X and Y exactly, or is it just 'nearby'?
Daniel, CloudCompare admin
Re: Automatically Extracting Z Coordinates from ASC
Yes, I know X,Y only "nearby".
Re: Automatically Extracting Z Coordinates from ASC
Ok, so there's a trick:
- transfer the Z coordinate of your first cloud to a scalar field ('Edit > Scalar fields > Export coordinate(s) to SF')
- flatten the first cloud with 'Edit > Multiply / scale' by multiplying only the Z dimension by 0
- transfer the 'Z' scalar field to the second 2D cloud (assuming you can save all the 2D points in one cloud) with 'Edit > Scalar fields > Interpolate from another entity' (you'll have to select both clouds). You can choose various methods, but I guess in your case the 'Nearest neighbor' and 'Average' options will be sufficient.
- now you can restore the Z coordinate on the second (2D) cloud, with 'Edit > Scalar fields > Set SF as coordinate(s)'.
- transfer the Z coordinate of your first cloud to a scalar field ('Edit > Scalar fields > Export coordinate(s) to SF')
- flatten the first cloud with 'Edit > Multiply / scale' by multiplying only the Z dimension by 0
- transfer the 'Z' scalar field to the second 2D cloud (assuming you can save all the 2D points in one cloud) with 'Edit > Scalar fields > Interpolate from another entity' (you'll have to select both clouds). You can choose various methods, but I guess in your case the 'Nearest neighbor' and 'Average' options will be sufficient.
- now you can restore the Z coordinate on the second (2D) cloud, with 'Edit > Scalar fields > Set SF as coordinate(s)'.
Daniel, CloudCompare admin
Re: Automatically Extracting Z Coordinates from ASC
Works perfectly. Thank you :)