Themis.Las 2022.10.27

There is a newer version of this package available.
See the version list below for details.
dotnet add package Themis.Las --version 2022.10.27                
NuGet\Install-Package Themis.Las -Version 2022.10.27                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Themis.Las" Version="2022.10.27" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Themis.Las --version 2022.10.27                
#r "nuget: Themis.Las, 2022.10.27"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Themis.Las as a Cake Addin
#addin nuget:?package=Themis.Las&version=2022.10.27

// Install Themis.Las as a Cake Tool
#tool nuget:?package=Themis.Las&version=2022.10.27                

Themis.Las

Themis.Las is a C# (.NET6) project that exposes APIs for working with LiDAR point cloud in the form of ASPRS LAS files. It attempts to expose a simple interface where a consumer can iterate through a LAS file (of any format) point-by-point and perform any business logic they desire upon each point, and then output those points to any other format.

Themis.Las.Time contains a series of helper functions for handling common timestamp manipulation that often occurs when working with point cloud data.

Usage

In order to parse a LAS file available on local disk, it can be done via the following:

string lasFile = @"..\points.las";
using var reader = new LasReader(lasFile);
var lpt = new LasPoint();

//< Histogram to count number of points by classification
var hist = new uint[byte.MaxValue];
//< Iterate through all points in the file and update histogram
while (!reader.EOF)
{
    reader.GetNextPoint(ref lpt);
    hist[lpt.Classification]++;
}

One should note that the LasPoint class is used to represent a LAS PointRecord of ANY format with a few caveats:

  • The position values are the actual decimal coordinate rather than the integer values stored in the LAS file itself.
  • Only when writing back out to disk is the LasPoint converted into the necessary output struct.

Instantiating a single LasPoint first and then updating its fields with a call to reader.GetNextPoint(ref lpt) provides a significant performance boost when compared to created a new LasPoint for each new record as follows:

using var reader = new LasReader(lasFile);
while (!reader.EOF)
{
    var lpt = reader.GetNextPoint();
    hist[lpt.Classification]++;
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2024.2.9 165 2/12/2024
2023.10.12 155 10/12/2023
2022.10.27 332 10/27/2022