LasSplitter¶
LasSplitter splits a LAS file into a grid of smaller files, of equal size, to process a large survey in pieces or to share a part of it. LasMerger merges them back.
Details¶
The bounds of the points are divided into a grid of equal pieces, and each point is written to the piece that contains it. The pieces are named as the input file with a number, from 1 at the south-west corner, going north first and then east: with 2 x 2 pieces, 1 is the south-west one, 2 the north-west, 3 the south-east and 4 the north-east.
The pieces keep the scale, the offset and the crs of the input file. A piece without points is written all the same, empty. LasMerger merges the pieces back into a single file.
Parameters¶
Splits a las file into a grid of smaller files.
Toolbox folder: Lesto › filter
Status: Experimental
Keywords: las, split
Authors: Andrea Antonello
Class: org.hortonmachine.lesto.modules.filter.LasSplitter
Inputs
Parameter |
Type |
Unit |
Default |
Description |
|---|---|---|---|---|
|
LAS file |
The las file to split. |
||
|
int |
|
The number of rows of the grid of pieces. |
|
|
int |
|
The number of columns of the grid of pieces. |
Outputs
Parameter |
Type |
Unit |
Description |
|---|---|---|---|
|
output folder |
The optional folder of the pieces, named as the input file with a number. If not supplied, the folder of the input file is used. |
Example¶
The sample survey split in 2 x 2 pieces of about 30 x 30 m, in the folder las_pieces:
import org.hortonmachine.lesto.modules.filter.LasSplitter
// the folder with the lidar survey: change it to yours
var folder = "/data/flanginec/"
// split the survey in 2 x 2 pieces, uni_bz_plot777_1.las to uni_bz_plot777_4.las
new File(folder + "las_pieces").mkdirs()
var splitter = new LasSplitter()
splitter.inFile = folder + "uni_bz_plot777.las"
splitter.pRows = 2
splitter.pCols = 2
splitter.outFolder = folder + "las_pieces"
splitter.process()
The four pieces are uni_bz_plot777_1.las, the south-west one, to uni_bz_plot777_4.las, the north-east one, each with its prj file.