FME Version
Files
Introduction
The nature of point cloud data usually implies substantial file sizes. It is not unusual that a point cloud dataset consists of dozens or hundreds of files well over 100 Mb each. In some situations, however, the end users do not require such volumes of data and instead only requires a small portion of the entire dataset. The examples below demonstrate how FME can be used to create smaller point cloud datasets that are easier to handle. This is especially useful when using mapping applications in a browser.
Step-by-step Instructions
Tiling with Pre-Defined Grid
A pre-defined grid can be used to create point cloud tiles in FME. This is especially useful if the same grid has been or will be used to create tiles for other data formats. For example, orthophotos may be tiled and by using the same grid scheme for point clouds, both the orthophoto and point cloud tiles will align correctly and further manipulation may be done more efficiently. The steps below outline how point cloud tiles can be created with a shapefile grid:
- Add an Esri Shapefile Reader with default parameters for the “Tiles” shapefile and an LAS reader with default parameters for the point cloud.
- Add a Clipper transformer. Attach the grid to “Clipper” and the point cloud to “Clippee”. This will reduce the point cloud to the extents of the grid and transfer the TILE_ID attribute from the shapefile grid to the corresponding points that fall within the grid tile.
- Connect the transformer PointCloudCombiner to the “Insider” output from the clipper. In the parameters set “Group by” to “TILE_ID”. Now FME will consider the points with the same TILE_ID as a single geometry.
- The LAS files can now be connected to an LAS writer with default parameters. This will write out multiple point clouds by TILE_ID.
The image below shows how the predefined shapefile grid was used to split the point cloud into tiles and what their assigned TILE_ID values are
Using the Tiler Transformer
If there is no predefined grid or the point cloud tile location does not need to be linked to an exact location, you can use the Tiler transformer. This transformer will use user-specified tile width and height to chop the point cloud into portions. The example workspace follows the outlined steps below:
- Add an LAS reader with default parameters for the input point cloud dataset.
- Add a PointCloudCombiner transformer and connect the reader to the input port. The parameters can remain as the defaults.
- Connect the “Output” to a Tiler transformer. Under “Tile Size” in the parameters change both “Tile Width” and “Tile Height” to 500. This will split the point cloud into tiles that are 500x500 units (FME uses the units of the data’s coordinate system).
- Add the StringFormatter transformer. Set Attributes as “_column,_row” to define the attribute column names and Format String as “02d”. This text is a type of code that represents how you would like the text to be formatted when filled into the attribute columns. The 0 indicates that values will be padded with zeros, the 2 indicates the character width will be 2 characters, and d indicates that these values will be integers. The image below shows the resulting table which can be viewed in the Data Inspector if an inspector is connected to the StringFormatter.
- Add a StringConcatenator and connect the input port to the “Output” from StringFormatter. In the parameters set “New Attribute” to TILE_ID. Under “String Parts” add a new row with “String Type” set to “Attribute Value” and “String Value” set to “_column”. Add another row with “String Type” set to “Attribute Value” and “String Value” set to “_row”. This will create a new attribute column which will combine the _column and _row string values to create a new TILE_ID value.
- A new LAS file can now be written with default parameters from the StringConcatenator output.
The image below shows how the Tiler transformer was used to split the point cloud into tiles and what their assigned TILE_ID values are.
Data Attribution
- The data from these exercises originates from data made available by West Virginia View. They are sponsored by AmericaView and the USGS.
Comments
0 comments
Please sign in to leave a comment.