Themis.Las
2023.10.12
See the version list below for details.
dotnet add package Themis.Las --version 2023.10.12
NuGet\Install-Package Themis.Las -Version 2023.10.12
<PackageReference Include="Themis.Las" Version="2023.10.12" />
paket add Themis.Las --version 2023.10.12
#r "nuget: Themis.Las, 2023.10.12"
// Install Themis.Las as a Cake Addin #addin nuget:?package=Themis.Las&version=2023.10.12 // Install Themis.Las as a Cake Tool #tool nuget:?package=Themis.Las&version=2023.10.12
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- MathNet.Numerics (>= 5.0.0)
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 | 169 | 2/12/2024 |
2023.10.12 | 157 | 10/12/2023 |
2022.10.27 | 335 | 10/27/2022 |