use of option '-use_bb' with lasgrid

29 views
Skip to first unread message

Martin Isenburg

unread,
May 15, 2016, 2:42:43 PM5/15/16
to LAStools - efficient command line tools for LIDAR processing
Hello,

lasgrid will by default make the generated rasters only as big as there are filled grid cells and thereby make the raster bounding box as small as possible. The option '-use_bb' assures that the resulting raster uses the full bounding box of the input - whether there are filled grid cells or not.

I had a question of why the reuslting merged ASC raster was not "square" after merging a four (a 2 by 2 grid of) existing ASC rasters. The tool lasgrid reads those ASC rasters via on-the-fly conversion of grid cells to LAS points and then creates a grid with the tightest possible bounding box as output. If you want to use the *full* bounding box with all the empty space included you need to add the '-use_bb' parameter. See the bounding boxes of the four example ASC rasters and the two possible ways of merging them with lasgrid below:
 
D:\LAStools\bin>more DGMWA001_323925899.asc
ncols           1000
nrows           1000
xllcorner       392000.00
yllcorner       5899000.00
cellsize        1.00
NODATA_value    -9999.00
-9999.00 -9999.00 -9999.00 -9999.00 -9999.00 [...]

D:\LAStools\bin>more DGMWA001_323925900.asc
ncols           1000
nrows           1000
xllcorner       392000.00
yllcorner       5900000.00
cellsize        1.00
NODATA_value    -9999.00
-9999.00 -9999.00 -9999.00 -9999.00 -9999.00 [...]

D:\LAStools\bin>more DGMWA001_323935899.asc
ncols           1000
nrows           1000
xllcorner       393000.00
yllcorner       5899000.00
cellsize        1.00
NODATA_value    -9999.00
-6.87 -6.80 -6.72 -6.64 -6.57 -6.51 -6.46 -6.40 [...]

D:\LAStools\bin>more DGMWA001_323935900.asc
ncols           1000
nrows           1000
xllcorner       393000.00
yllcorner       5900000.00
cellsize        1.00
NODATA_value    -9999.00
-4.73 -4.73 -4.72 -4.72 -4.71 -4.71 -4.71 -4.72 [...]

D:\LAStools\bin>lasgrid.exe -i DGM*.asc -merged -o DGM_merged.asc

D:\LAStools\bin>more DGM_merged.asc
ncols 1350
nrows 2000
xllcorner 392650.000000
yllcorner 5899000.000000
cellsize 1.000000
NODATA_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 [...]

D:\LAStools\bin>lasgrid.exe -i DGM*.asc -merged -o DGM_merged_bb.asc -use_bb

D:\LAStools\bin>more DGM_merged_bb.asc
ncols 2000
nrows 2000
xllcorner 392000.000000
yllcorner 5899000.000000
cellsize 1.000000
NODATA_value -9999.0
-9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0 -9999.0

Regards,

Martin @rapidlasso
lasgrid_DGM_merged_tight_bb.jpg
lasgrid_DGM_merged_use_bb.jpg
Reply all
Reply to author
Forward
0 new messages