Altemiq.IO.Las 1.5.0

dotnet add package Altemiq.IO.Las --version 1.5.0
                    
NuGet\Install-Package Altemiq.IO.Las -Version 1.5.0
                    
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="Altemiq.IO.Las" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Altemiq.IO.Las" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Altemiq.IO.Las" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Altemiq.IO.Las --version 1.5.0
                    
#r "nuget: Altemiq.IO.Las, 1.5.0"
                    
#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.
#:package Altemiq.IO.Las@1.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Altemiq.IO.Las&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Altemiq.IO.Las&version=1.5.0
                    
Install as a Cake Tool

About

Provides high-performance and low-allocating types that read and write LAS points to streams.

Key Features

  • Supports LAS versions 1.1-1.5
  • Support for ExtraBytes
  • WKT support for OGC variable length records

How to Use

Reading:

using Altemiq.IO.Las;

using LasReader reader = new("example.las");

while (await reader.ReadPointDataRecordAsync() is { PointDataRecord: not null } point)
{
    if (point.PointDataRecord is IGpsPointDataRecord gps)
    {
        // do something with the GPS information
    }
    
    // get the extra bytes
    var value = await extraBytes.GetValueAsync(0, point.ExtraBytes);
    if (value is double doubleValue)
    {
        // do something with the extra bytes.
    }
}

Writing:

using Altemiq.IO.Las;

HeaderBlockBuilder builder = new()
{
    SystemIdentifier = "Our System",
    GeneratingSoftware = "My.Software.exe",
    Version = new(1, 1),
    FileCreation = new DateTime(2010, 1, 1).AddDays(40),
    PointDataFormatId = 1,
    LegacyNumberOfPointRecords = 1,
};

GeoKeyDirectoryTag geoKeyDirectoryTag =
[
    new() { Count = 1, KeyId = GeoKey.GTModelTypeGeoKey, ValueOffset = 1 },
    new() { Count = 1, KeyId = GeoKey.ProjectedCRSGeoKey, ValueOffset = 32754 },
    new() { Count = 1, KeyId = GeoKey.ProjLinearUnitsGeoKey, ValueOffset = 9001 },
    new() { Count = 1, KeyId = GeoKey.VerticalUnitsGeoKey, ValueOffset = 9001 },
];
ExtraBytes extraBytes =
[
    new()
    {
        DataType = ExtraBytesDataType.Short,
        Options = ExtraBytesOptions.Scale | ExtraBytesOptions.Offset,
        Scale = 0.01,
        Offset = 250,
        Name = "height above ground",
        Description = "vertical point to TIN distance",
    },
];

Span<byte> span = stackalloc byte[sizeof(short)];
using LasWriter writer = new("example.las");
writer.Write(builder.HeaderBlock, geoKeyDirectoryTag, extraBytes);

GpsPointDataRecord point = new()
{
    X = 0,
    Y = 0,
    Z = 0,
    ReturnNumber = 0,
    NumberOfReturns = 0,
    Classification = Classification.LowVegetation,
    ScanDirectionFlag = false,
    EdgeOfFlightLine = false,
    ScanAngleRank = 0,
    PointSourceId = 0,
    GpsTime = 0,
};

_ = extraBytes.Write(span, 123.34);
writer.Write(point, span);

Main Types

The main types provided by this library are:

  • Altemiq.IO.Las.PointDataRecord
  • Altemiq.IO.Las.LasReader
  • Altemiq.IO.Las.LasWriter
  • Altemiq.IO.Las.HeaderBlockBuilder
  • Altemiq.IO.Las.HeaderBlock
  • Altemiq.IO.Las.VariableLengthRecord
  • Altemiq.IO.Las.ExtendedVariableLengthRecord (for LAS 1.4+)

Additional Documentation

Feedback & Contributing

Altemiq.IO.Las is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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 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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on Altemiq.IO.Las:

Package Downloads
Altemiq.IO.Las.Compression

Provides support for LAZ compression for Altemiq.IO.Las

Altemiq.IO.Las.Indexing

Provides support for indexing LAS/LAZ files

Altemiq.IO.Las.S3

Provides support for reading LAS/LAZ files through Amazon S3

Altemiq.IO.Las.Arrow

Provides support for reading LAS/LAZ to Apache Arrow formats

Altemiq.IO.Las.Geodesy

Provides support for coordinate systems for the OGC variable length records in Altemiq.IO.Las

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 0 6/29/2026
1.5.0-beta.109 0 6/29/2026
1.5.0-beta.108 74 6/26/2026
1.5.0-beta.106 79 6/26/2026
1.5.0-beta.105 52 6/25/2026
1.5.0-beta.103 63 6/25/2026