Solved

Adding a new label for las file based on clipping of points


I am trying to add an extra label for each point of the point cloud based on whether or not they were located inside or outside the gml building model.

 

When I clipped a model with my point cloud data with "Clipper", it only identified that point cloud was outside and that point cloud data was identified as 1 feature own on its.

 

How do I label/mark each point in the point cloud whether they clipped with the model or not and then save it as an extra information/variable in a new las file.

icon

Best answer by khairilariffin 12 May 2023, 21:10

View original

5 replies

Userlevel 2
Badge +17

Hi @khairilariffin​,

You can use a pair of PointCloudComponentAdders after the Clipper, one connected to the Inside port, and the other connected to the Outside. Set a comment component name in each transformer, one set to the inside value, and other set to the outside value. Finally, send the outputs of both PointCloudComponentAdders to a PointCloudCombiner to merge back into a single cloud again.

Screen Shot 2023-05-09 at 1.32.20 PM

Hi @daveatsafe, thanks for the reply.

 

FME reads my LAS file as one feature. As such when I used Clipper, it read entire Point cloud as one feature instead of individual points and when compared to the GML model is read as Outside only. I am trying to identify and label each point in the point cloud if they are either inside or outside when compared to the GML 3D Model.

image 

Userlevel 2
Badge +17

Hi @daveatsafe, thanks for the reply.

 

FME reads my LAS file as one feature. As such when I used Clipper, it read entire Point cloud as one feature instead of individual points and when compared to the GML model is read as Outside only. I am trying to identify and label each point in the point cloud if they are either inside or outside when compared to the GML 3D Model.

image 

It looks like the GML features you are using as Clippers are being rejected. To clip a point cloud, the Clipper features should be either polygons (for 2D clip), or solids for (3D clip). 3D features from GML are usually a collection of surfaces rather than a solid, so you may need to use a SolidBuilder transformer to convert these to proper solids. A successful solid will require that there be no gaps in the input surfaces.

It looks like the GML features you are using as Clippers are being rejected. To clip a point cloud, the Clipper features should be either polygons (for 2D clip), or solids for (3D clip). 3D features from GML are usually a collection of surfaces rather than a solid, so you may need to use a SolidBuilder transformer to convert these to proper solids. A successful solid will require that there be no gaps in the input surfaces.

The 3D GML model is not causing the issue, rather I am still not able to label the individual point cloud from my LAS file. I was able to find a Transformer called PointCloudFilter but it requires an expression input which I do not know what to fill in since I require all the points from the point cloud.

To update. I was able to split data into its individual parts for clipper comparison using PointCloudToPointCoercer as adviced.

I then turn each of group of points into individual PointCloud feature. From here used PointCloudComponentAdder to add label based on which group, Inside or Outside.

I then combine both group back together before writing/saving them.

 

Remember to set the Inside or Outside under Additional component when setting up the LAS writer. Attached my workspace for reference.

Reply