The las4windows docs

las4windows is forked from GCS_scripts by Kenny Larrieu. The original code is designed for Python2 and the commercial arcpy library. The tweaked codes of las4windows run with Python 3.8 and work without arcpy. This repository only uses the GUI for lidar processing with LASTools.

Because LASTools is proprietary, its executables can hardly be run on Linux or other UNIX-based systems. This is why las4windows is a Windows-only (nomen est omen).

Prerequisites

LASTools is used for LiDAR Data Processing and can be downloaded here.

Python 3.x dependencies are provided with requirements.txt (most modern IDEs will provide to auto-install the packages listed in requirements.txt). Otherwise, make sure to install the following libraries in the Python3.x environment:

  • numpy

  • scipy

  • tkinter

  • pandas

Code Documentation

The GUI script

Things to consider adding:

choice of las or laz output set default values for lasground_new params clip structures step lasclassify params to identify buildings use veg polygon (if given) instead of inverse ground polygon to clip veg points

LiDAR_processing_GUI.get_largest(directory)[source]

returns name of largest file in directory

LiDAR_processing_GUI.las_files(directory)[source]

returns list of all .las/.laz files in directory (at top level)

LiDAR_processing_GUI.lof_text(pwd, src)[source]

creates a .txt file in pwd (LAStools bin) containing a list of .las/.laz filenames from src directory

LiDAR_processing_GUI.pd(filename)[source]

returns point density from lasinfo output .txt file

LiDAR_processing_GUI.pts(filename, lastoolsdir)[source]

returns number of points in las file

File and processing functions

file_functions.ar1_acorr(series, maxlags='')[source]

Returns lag, autocorrelation, and confidence interval using geometric autocorrelation for AR1 fit of series

file_functions.browse(root, entry, select='file', ftypes=['All files', '*'])[source]

GUI button command: opens browser window and adds selected file/folder to entry

file_functions.check_use(filepath)[source]

Checks if a file or list of files is in use by another process If the file cannot be opened or there is an associated .lock file, it throws an exception.

file_functions.cmd(command)[source]

Executes command prompt command

file_functions.cox_acorr(series, maxlags='')[source]

Returns two lists: lags and autocorrelation, using Cox variant 3 of ACF

file_functions.ft(x, y)[source]

Returns the fourier transform magnitude of the x,y data

file_functions.get_all_files(dir, prefix='', suffix='', nesting=True)[source]

Returns list of all files in directory

Parameters
  • dir (str) – the directory of interest

  • prefix (str) – if provided, files returned must start with this

  • suffix (str) – if provided, files returned must end with this

  • nesting (bool) – if True, looks in all subdirectories of dir. If false, only looks at top-level.

file_functions.init_logger(filename)[source]

Initializes logger

file_functions.split_list(l, break_pts)[source]

returns list l split up into sublists at break point indices

file_functions.split_reaches(l, new_reach_pts)[source]

splits l into sections where new_reach_pts contains the starting indices for each slice

file_functions.white_noise_acf_ci(series, maxlags='')[source]

Returns the 95% confidence interval for white noise ACF

Disclaimer and License

No warranty is expressed or implied regarding the usefulness or completeness of the information provided for las4windows and its documentation. References to commercial products do not imply endorsement by the Authors of las4windows. The concepts, materials, and methods used in the codes and described in the docs are for informational purposes only. The Authors have made substantial effort to ensure the accuracy of the code and the docs and the Authors shall not be held liable, nor their employers or funding sponsors, for calculations and/or decisions made on the basis of application of las4windows. The information is provided “as is” and anyone who chooses to use the information is responsible for her or his own choices as to what to do with the code, docs, and data and the individual is responsible for the results that follow from their decisions.

Copyright (c) 2020, the Authors of las4windows. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.