Calculate Distance between Polyline and Point cloud

Feel free to ask any question here
Post Reply
Ingo
Posts: 3
Joined: Sun Jun 18, 2017 8:44 pm

Calculate Distance between Polyline and Point cloud

Post by Ingo »

First of all, let me say that CloudCompare ist fantastic - have been using it a lot for my PhD and it’s absolutely great!

Now on to my question:
I have a TLS point cloud of a 100m high alpine rock wall. I’m only interested in the lowest section of the rock wall. Therefore, I’d like to remove all points that are farther away than, say, 10m from the base of the rock wall.

I manually drew a polyline that represents the base of the rock wall with the ‘Trace Polyline’ tool. Now I would like to remove all points that are farther away than 10m from this polyline. (Ideally, I would like to construct a virtual cylinder (with a radius of 10m) around the polyline and then remove all points that are outside of the cylinder).

I tried to do solve my problem with the ‘Extract cloud sections along polylines…’ tool but was not successful. The plugin ‘Surface of Revolution Analysis’ sounds good but only accepts 2D profile lines.

Any advice would be greatly appreciated!
Ingo
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Calculate Distance between Polyline and Point cloud

Post by daniel »

If you can create two polylines (one for the lower limit and one for the upper limit, you could then use the 'Edit > Mesh > Surface between two polylines' tool. This will create a surface that you could use to filter out the other points. But it may not work properly depending on the shape of the wall.

Maybe a snapshot of the 'wall' would help me to understand better what you are trying to do ;)
Daniel, CloudCompare admin
Ingo
Posts: 3
Joined: Sun Jun 18, 2017 8:44 pm

Re: Calculate Distance between Polyline and Point cloud

Post by Ingo »

Hi Daniel, thanks a lot for your quick response!

Drawing another polyline at the upper limit is not really an option for me, unfortunately.

This is what I am trying to do, explained in more detail: The lower limits (base) for all rock walls I am investigating in my PhD are glacier surfaces. I'd like to show how certain 'rock wall parameters' (e.g. surface characteristics, rockfall activity etc.) vary with increasing (vertical) distance to the glacier surface. To do so I want to classify my rock walls into 10m sections (-> Section 1: 0-10m, Section 2: 10-20m, Section 3: 20-30m,...). In the next step I could then calculate the 'rock wall parameters' for each of the sections. (Note: The glacier surface is not even, so I cannot simply use the z-values.)

I uploaded a screenshot of one of my rock walls. The glacier at the base of the rock wall is almost completely cut out already. The maximum vertical extent is approx. 70m (just to help your imagination).

Again thanks in advance!

Ingo
Attachments
rock_wall.jpg
rock_wall.jpg (51.28 KiB) Viewed 6034 times
Dimitri
Posts: 156
Joined: Mon Oct 18, 2010 9:01 am
Location: Rennes (France)
Contact:

Re: Calculate Distance between Polyline and Point cloud

Post by Dimitri »

Quick trick that may work without a polyline:
. Create a raster of your point cloud using the Z direction, using the min elevation and "spatial resampling option" at a grid size commensurate with your problem (e.g., 0.5 m for a glacier face should be ok). His should create a "dummy" point cloud with very few points that are the base of your cliff sampled roughly every 50 cm. There might be some odd points high up if your cliff as overhangs that are larger than your pixel spacing but this should be easily cleaned manually.
. Then use a C2C calculation using the "base cloud" as a ref, and tick the option X,Y,Z. You'll be able to know for each point of your cliff the distance to the base (either the absolute distance, or the vertical difference).

Hope this helps

Dimitri Lague
Ingo
Posts: 3
Joined: Sun Jun 18, 2017 8:44 pm

Re: Calculate Distance between Polyline and Point cloud

Post by Ingo »

Hi Dimitri,

thanks, this is a very nice workaround that works perfectly well for me - Thank you very much indeed!
(I could also skip the step of creating a raster and simply cut out the baseline of my rock wall, that's a pretty quick procedure actually.)

BTW, I've been using the M3C2 algorithm quite a lot for the identification of rockfall release zones - it's really awesome!

Ingo
Post Reply