Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LAS File Parser (Go)

A Go library for parsing, reading, and converting ASPRS LAS 1.4 LiDAR point cloud files.

Features

  • Full support for LAS 1.1–1.4 public header, VLRs, EVLRs, and all point formats (0–10)
  • CSV export of point data
  • Extensible for custom VLRs/EVLRs
  • Written in pure Go, no C dependencies

Installation

go get github.com/dalir/las

Usage Example

package main

import (
	"github.com/dalir/las"
	"log"
)

func main() {
	lasFile := las.Las{}
	if err := lasFile.Parse("./pointcloud.las"); err != nil {
		log.Fatalf("error parsing LAS file: %v", err)
	}

	if err := lasFile.Las2txt("./pointcloud.txt"); err != nil {
		log.Fatalf("error converting to txt: %v", err)
	}
}

API Overview

  • Parse(filename string) error: Parse a LAS file (header, VLRs, points, EVLRs)
  • ParseHeader(filename string) error: Parse only the LAS header
  • Las2txt(outputFile string) error: Export point data to CSV
  • WriteHeader(filename string) error: Write the current header to a file

See GoDoc for full API details.

LAS Format Reference

Contributing

Pull requests and issues are welcome! Please add tests for new features or bugfixes.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages