Automatically Extracting Z Coordinates from ASC

Feel free to ask any question here
Post Reply
Pikros
Posts: 3
Joined: Sun Feb 04, 2024 7:17 pm

Automatically Extracting Z Coordinates from ASC

Post by Pikros »

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?
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Automatically Extracting Z Coordinates from ASC

Post by daniel »

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
Pikros
Posts: 3
Joined: Sun Feb 04, 2024 7:17 pm

Re: Automatically Extracting Z Coordinates from ASC

Post by Pikros »

Yes, I know X,Y only "nearby".
daniel
Site Admin
Posts: 7382
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Automatically Extracting Z Coordinates from ASC

Post by daniel »

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)'.
Daniel, CloudCompare admin
Pikros
Posts: 3
Joined: Sun Feb 04, 2024 7:17 pm

Re: Automatically Extracting Z Coordinates from ASC

Post by Pikros »

Works perfectly. Thank you :)
Post Reply