las

package
v0.0.0-...-0008b12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package las implements read access to LASF style lidar files. All header versions (0, 1, 2, 3, 4) are supported.

Index

Constants

View Source
const (
	LASF_OK = iota
	LASF_CANTOPEN
	LASF_CANTREAD
	LASF_INVALIDHANDLE
	LASF_INVALIDINDEX
	LASF_INVALIDPOINT
	LASF_ERROR
)

Variables

View Source
var ErrInvalidFormat = errors.New("Invalid point record format")
View Source
var ErrInvalidIndex = errors.New("Invalid point record index")

Functions

func LasfOpen

func LasfOpen(fname string, fid *int) int

func LasfPointX

func LasfPointX(fid int, x *float64) int

func LasfPointY

func LasfPointY(fid int, y *float64) int

func LasfPointZ

func LasfPointZ(fid int, z *float64) int

func LasfReadNextPoint

func LasfReadNextPoint(fid int) int

Types

type GpsTimePacket

type GpsTimePacket float64

Base types

func (GpsTimePacket) GpsTime

func (gps GpsTimePacket) GpsTime() float64

func (*GpsTimePacket) SetGpsTime

func (gps *GpsTimePacket) SetGpsTime(t float64)

type Lasf

type Lasf struct {
	// contains filtered or unexported fields
}

func Open

func Open(filename string) (*Lasf, error)

Open attempts to open filename and read the LASF header. If the file is not a valid LASF file, or it cannot be opened, nil and the associated error is returned.

func (*Lasf) BuildQuadTree

func (las *Lasf) BuildQuadTree()

BuildQuadTree creates a simple spatial index to potentially speed up filtered reads using GetNextPoint.

func (*Lasf) ClearFilter

func (las *Lasf) ClearFilter()

ClearFilter clears the spatial filter. Rewind() is called and sequential reading is reset.

func (*Lasf) GetNextPoint

func (las *Lasf) GetNextPoint() (Pointer, error)

GetNextPoint reads the next point in the file. After the file is opened and any VLRs are read into memory, the file pointer is set to the first point. Each call to GetNextPoint returns the next point in the file. This sequence is interupted if GetPoint is explicitly called. This means GetNextPoint returns point n, then a call GetPoint(m), GetNextPoint will return point at m+1, not n+1. If there is an error reading the point, or if we seek past the end of the points, nil and error are returned.

func (*Lasf) GetPoint

func (las *Lasf) GetPoint(n uint64) (Pointer, error)

GetPoint fetches a specific point at index n.

func (*Lasf) Rewind

func (las *Lasf) Rewind() error

Rewind resets the the point index to the first point in the file

func (*Lasf) SetFilter

func (las *Lasf) SetFilter(xmin, xmax, ymin, ymax float64)

SetFilter applies a minimum bounding rectangle spatial filter on points returned by GetNextPoint. GetPoint is unaffected by the filter. If a QuadTree has been built, it is used to potentially speed up access.

type Pointer

type Pointer interface {
	RecordFormat() uint8
	X() float64
	Y() float64
	Z() float64
	Intensity() uint16
	RetNum() uint8
	RetCount() uint8
	ScanFlag() uint8
	Edge() uint8
	Classification() uint8
	//ClassificationString string
	ScanAngle() int16
	UserData() uint8
	PointSourceID() uint16
	GpsTime() float64
	Red() uint16
	Green() uint16
	Blue() uint16
	NIR() uint16
	WavePacketDesc() uint8
	WaveOffset() uint64
	WaveSize() uint32
	//ReturnPointWaveLoc uint32
	X_t() float32
	Y_t() float32
	Z_t() float32
}

type TextAreaDescVlr

type TextAreaDescVlr struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL