Skip to main content
I have some classfied Lidar and would like to generate 2D building footprints from them. I used a point cloud filter to separate the points with building classification and then used GeometryCoercer to turn them into points. I now have point cloud and points that look like buildings in the Data Inspector as shown:

 

Point Cloud with building classification

 

 

 

Points created by GeometryCoercer

 

 

I'm not clear where to go from here. Buffer by certain amount? Is there a best transformer here?

 

 

Thanks
Use HullAccumulator to get the outline of points
Hi Jim,

 

 

I agree that the HullAccumulator is suitable to create roughly outline of points.

 

But I think you will have to add an attribute which can be used as the "Group By" parameter of the transformer beforehand. Maybe it's the major subject.

 

One possible way is:

 

(1) Perform buffering of the points by a certain amount, grouping by an attribute containing an identical value (e.g. fme_basename etc.) so that the overlapped buffered areas will be dissolved.

 

(2) Add "Group ID" attribute to each dissolved area with the Counter.

 

(3) Clip the original points by the dissolved areas to transfer the Group ID to the points.

 

(4) Use the HullAccumulator (Group By: Group ID) to create outline for each group of points.  

 

 

Takashi
Iijima-san, perfect solution!
Unfortunately there is no natural id field on which to group. There could be any number of buildings in a single LAS file, so fme_basename doesn't work. Without the grouping, the HullAccumulator groups all of the buildings in a LAS file into one. The task needs a transformer(s) that can spatially relate the points that are "close" to each other.

 

 

Perhaps there is a way using the NeighbourFinder, which generates a list of candidates for each point. However, the code might be complex. It would be nice if Safe had such a transformer. More organizations are using Lidar and want to work with the classifications that Lidar produces.
My intention is to newly add group ID to the points. The "natural id" field is not necessary.

 

I try to explain again with other words.

 

 

(1) Buffer the points by a certain amount to create areas which represent roughly buildings.

 

If you set an attribute containing an identical value to Group By of the Bufferer, overlapped areas will be dissolved, like this.

 

 

If the points don't have appropriate attribute to do that, just add an attribute storing an identical constant value with the AttributeCreator before the buffering.

 

 

(2) Add group ID to the resulting areas with the Counter.

 

 

(3) To transfer the group ID to the original points, clip the points by the buffered areas with the Clipper.
The ListCombiner from the FME Store can be used to add group ID to the points based on the list created by the NeighborFinder. But it's not so efficient.
That is an excellent solution, kktshka and Takashi, thanks. My transformers in order are:
  • LAS file reader
  • PointCloudFilter (filter  @Component(classification) == 6, which is buildings)
  • PointCloudThinner (set to 4 right now)
  • PointCloudCoercer (Output Geometry: Individual Points)
  • Bufferer (set to 1 metre right now)
  • Dissolver
  • Counter (Count Output Attribute: groupId)
  • Clipper (Dissolved goes to Clipper port, PointCloudCoercer goes to Clippee port)
  • HullAccumulator (Group By: groupId, Hull Type: Concave)

 

The only remaining problem is that there are 168 LAS files and each is about 700 MB. It seems possible that something will fail doing all of that processing.

 

 

I therefore created another script that reads from the LAS directory, and sends parameters to a workspace runner with filename, directory, etc. I used a generic writer with Output Format: Shape. The writer takes its Destination Folder and Base filename from parameters that the workspace runner populates.

 

 

The workspace that the workspace runner calls now reads one LAS file, does the process to make the polygons from that LAS file, and then writes an individual shapefile in its own directory for each LAS file. If the process crashes, I will still have the shapefiles already written.

 

 

I didn't need the ListCombiner, but it is good to know about it.

Reply