Question

Batch Merge LiDAR tiles (.asc).

  • 9 January 2023
  • 7 replies
  • 29 views

Badge

I need to merge individual 1km2 LIDAR tiles in .asc format to form a single layer.

 

I have a table (.xlsx) which lists the .asc files, their folder location and the site reference they are associated to. I have read the table into FME and using a FeatureReader and can open all the .asc files and by using the RasterMosaicker, and Reprojector I can combine the the .asc files and output the merged LiDAR.

 

This works fine for a single site. Of course when I add further sites to the table I end up with all the LiDAR merged into a single feature.

 

How can I set up FME to iterate through the table merging the necessary tiles and produce a single LiDAR output before repeating the process for the remaining sites?

 

 


7 replies

Userlevel 3
Badge +26

I would suggest adding the additional sites to the XLS spreadsheet as separate sheets or tabs. When you read these in, the name of the tab the record came from will be listed on the fme_feature_type format attribute. In the RasterMosaicker, set the Group By parameter to fme_feature_type, which should output a single raster for each of the input tabs.

EDIT: Just noticed the FeatureReader. Prior to the FeatureReader, you may need to rename fme_feature_type on the XLS features to something different like "sourceXLS". Then in the FeatureReader set the Attribute Accumulation Mode to Merge Initiator and Result. This should ensure that the value from the original fme_feature_type is carried over to the ASC files being read in. Then use "sourceXLS" as the group by.

Badge

I would suggest adding the additional sites to the XLS spreadsheet as separate sheets or tabs. When you read these in, the name of the tab the record came from will be listed on the fme_feature_type format attribute. In the RasterMosaicker, set the Group By parameter to fme_feature_type, which should output a single raster for each of the input tabs.

EDIT: Just noticed the FeatureReader. Prior to the FeatureReader, you may need to rename fme_feature_type on the XLS features to something different like "sourceXLS". Then in the FeatureReader set the Attribute Accumulation Mode to Merge Initiator and Result. This should ensure that the value from the original fme_feature_type is carried over to the ASC files being read in. Then use "sourceXLS" as the group by.

I like the idea but I have many thousands of these merges to complete and would run out of sheets within Excel. I should have mentioned this in my initial post.

Userlevel 3
Badge +26

I like the idea but I have many thousands of these merges to complete and would run out of sheets within Excel. I should have mentioned this in my initial post.

Can you post a sample of excel file with multiple sites added, either an attachment or screenshot?

Badge

I like the idea but I have many thousands of these merges to complete and would run out of sheets within Excel. I should have mentioned this in my initial post.

image

Userlevel 3
Badge +26

I like the idea but I have many thousands of these merges to complete and would run out of sheets within Excel. I should have mentioned this in my initial post.

Assuming the Ref and Name fields denote separate sites, you could use either of these in the Group Processing parameter in the RasterMosaicker. In your FeatureMerger under the Attribute and Geometry Handling section, set the Accumulation Mode to Merge Initiator and Result. The rasters read should now get both of these attributes.

Badge

I like the idea but I have many thousands of these merges to complete and would run out of sheets within Excel. I should have mentioned this in my initial post.

This is how my workspace looks so far:image

Userlevel 3
Badge +26

I like the idea but I have many thousands of these merges to complete and would run out of sheets within Excel. I should have mentioned this in my initial post.

Yep, in your FeatureReader set the Accumulation Mode to Merge Initiator and Result. And then in your RasterMosaicker, set your Group By to REF. You should then get a raster for each of the unique values in REF.

Reply