Skip to main content
Solved

3D distance between points and polygon


v.martin_96

Hello,

I would like to create the Dist CLoud/Mesh tool of CloudCompare.

I have 2 input files. One is individual points (PointCloudCoercer : Individual Points) from the class Building of a Lidar point Cloud and second is polygons representing roofs in SHAPEFILE. I wanted to measure the (vertical) distance from each point to the nearest polygon.

I firstly used the SurfaceDraper to drape the points into the roof, then measure the distance between the draped point and the original points, but it didn't work as you can see below.

 

Do you have a solution to my issue ?

Thank you in advance,

Victor

Point cloud :

You can find the Shapefile polygon via this link: https://wetransfer.com/downloads/291f3edefb457b27a0f286ca68e3420120200624124047/919a8805a20a2c4b08eee3a830f2776e20200624124104/84c603

 

 

 

Best answer by jlbaker2779

You could try to use a PointCloudCoercer to create individual points, (I created an arbitrary surface with a bounding box and gave it a Z), extract the coordinates, overlay, and then use an ExpressionEvaluator to get the difference. After that is complete, you can turn it back into a point cloud with a combiner.

 

Attached .fmw

 

I ran through 10 million points in 5 minutes, but my laptop is pretty old so it should be fairly quick on beefier machine.

View original
Did this help you find an answer to your question?

6 replies

whkarto
Contributor
Forum|alt.badge.img+14
  • Contributor
  • June 22, 2020

Hi @v.martin_96

have you tried to turn point cloud and roof shapes into separate surface rasters, and subtract them to see the difference figures? Both data sets can be turned into rasters by help of SurfaceModeller.


Forum|alt.badge.img+2
  • Best Answer
  • June 22, 2020

You could try to use a PointCloudCoercer to create individual points, (I created an arbitrary surface with a bounding box and gave it a Z), extract the coordinates, overlay, and then use an ExpressionEvaluator to get the difference. After that is complete, you can turn it back into a point cloud with a combiner.

 

Attached .fmw

 

I ran through 10 million points in 5 minutes, but my laptop is pretty old so it should be fairly quick on beefier machine.


v.martin_96
jlbaker2779 wrote:

You could try to use a PointCloudCoercer to create individual points, (I created an arbitrary surface with a bounding box and gave it a Z), extract the coordinates, overlay, and then use an ExpressionEvaluator to get the difference. After that is complete, you can turn it back into a point cloud with a combiner.

 

Attached .fmw

 

I ran through 10 million points in 5 minutes, but my laptop is pretty old so it should be fairly quick on beefier machine.

Thank you for your comment ! Indeed, it works for flat roofs. But I'd like to create a script that can do it for roofs that don't have the same Z value on their whole surface like the picture below.

Thank you in advance !


Forum|alt.badge.img+2
v.martin_96 wrote:

Thank you for your comment ! Indeed, it works for flat roofs. But I'd like to create a script that can do it for roofs that don't have the same Z value on their whole surface like the picture below.

Thank you in advance !

Adding a chopper to the 3D roof with a .1 unit chop produces a grid to overlay the points on to inherit the z values. I'm assuming you are looking to filter out the data that isn't near the roof. See example shots below with the error removed. There is one point that for some reason or another decided it wanted to be a part of the roof.

 

Attached .fmwt with all data included.

(deleting comment below requesting data)

 

Representation as is

 

Representation chopped and filtered


v.martin_96
jlbaker2779 wrote:

Adding a chopper to the 3D roof with a .1 unit chop produces a grid to overlay the points on to inherit the z values. I'm assuming you are looking to filter out the data that isn't near the roof. See example shots below with the error removed. There is one point that for some reason or another decided it wanted to be a part of the roof.

 

Attached .fmwt with all data included.

(deleting comment below requesting data)

 

Representation as is

 

Representation chopped and filtered

It work ! Thank you very much for your help !


Forum|alt.badge.img+2
v.martin_96 wrote:

It work ! Thank you very much for your help !

Awesome! Most welcome! Please mark the question as answered.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings