Table of Contents

Class PclLasExporter

Namespace
PclIO.Export
Assembly
PclIO.dll

Exports point clouds to the ASPRS LAS 1.2 binary format (point format 2: XYZ, intensity, classification, RGB).

public static class PclLasExporter

Inheritance

Inherited Members

Remarks

The header needs the point count and bounds before the first record, so the source is enumerated twice (PclIO.PclDocument.ReadAllPoints(PclIO.PclReadOptions) is re-enumerable): pass one computes count and bounds, pass two writes the records. Memory use does not depend on the number of points. The output stream does not need to be seekable. Coordinates are stored with a fixed 1 mm scale, so the extent of each axis must not exceed about 2147 km. Points with non-finite coordinates are skipped. Intensity is clamped to 0..1 and stored as 16 bit; a point without intensity is written with full intensity, a point without colour is written white (the format has no "missing" value). Return number is always 1 of 1; normals are not exported.

Methods

Export(PclDocument, Stream, PclReadOptions?)

Writes the document's points to output and returns the number of points written.

public static long Export(PclDocument doc, Stream output, PclReadOptions? options = null)

Parameters

doc PclDocument

Source document.

output Stream

Destination stream.

options PclReadOptions?

Read options (limit, subsampling, transform); null for defaults.

Returns

long

Number of point records written.

Exceptions

NotSupportedException

The point count or the coordinate extent does not fit the LAS 1.2 limits.

InvalidOperationException

The source returned different points in the two passes.

Export(PclDocument, Stream, PclReadOptions?, out long)

Writes the document's points and also reports how many points were skipped.

public static long Export(PclDocument doc, Stream output, PclReadOptions? options, out long skippedPoints)

Parameters

doc PclDocument

Source document.

output Stream

Destination stream.

options PclReadOptions?

Read options (limit, subsampling, transform); null for defaults.

skippedPoints long

Number of points skipped because a coordinate was NaN or infinite.

Returns

long

Number of point records written.

Exceptions

NotSupportedException

The point count or the coordinate extent does not fit the LAS 1.2 limits.

InvalidOperationException

The source returned different points in the two passes.