Documentation ¶
Index ¶
- func BoxOverlap(b1, b2 Box) bool
- func CalcLeastSquareCircleFit(x []float64, y []float64) (float64, float64, float64)
- func Combine(inputLas *lidario.LasFile, outputLas *Writer, ReaderCount int)
- func Crop(lasPath []string, radius float64, intensityThreshold uint16, minPoint int, ...)
- func FindPoleCenter(input string, voxelCellSize float64, minpoint int, queryDist float64) (gx, gy, gz float64, err error)
- func GetHeader(fileName string) (lidario.LasHeader, error)
- func GetNumOfPoint(fileName string) (int, error)
- func OpenLasFile(fileName string) (*lidario.LasFile, error)
- func OpenLasHeader(fileName string) (*lidario.LasFile, error)
- func PointBuffer(p, shift Point, r float64) (Point, Point)
- func PointInBox(pt lidario.LasPointer, b Box) bool
- func RemoveGround(input, outputPath string, voxelCellSize float64, columethreshold int) (err error)
- func SplitbySourceID(laspath, outputPath string, ReaderCount int)
- type Box
- type Point
- type PointWorker
- type Reader
- type Splitter
- type VoxelGrid
- func (grid *VoxelGrid) Filter(minPoint int, queryDistance float64)
- func (grid *VoxelGrid) FindCenterPoint() (xa, ya, za []float64)
- func (grid *VoxelGrid) IndexToGlobal(x, y, z float64) (gx, gy, gz float64)
- func (grid *VoxelGrid) RemoveBottomZVoxel()
- func (grid *VoxelGrid) RemoveColumeByCount(threshold int)
- func (grid *VoxelGrid) SaveLas(path string, oriLas *lidario.LasFile) error
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcLeastSquareCircleFit ¶
CalcLeastSquareCircleFit computes a least square fit circle for a list of 2d-coordinates. It takes the x and y coordinates as arguments. Obviously the two argument arrays must have the same length. The function returns three values: The x,y location of the circle center and the radius of the circle.
func Crop ¶
func Crop(lasPath []string, radius float64, intensityThreshold uint16, minPoint int, signs []Point, outputRootPath string)
Crop point cloud
func FindPoleCenter ¶
func FindPoleCenter(input string, voxelCellSize float64, minpoint int, queryDist float64) (gx, gy, gz float64, err error)
FindPoleCenter filter out ground, noise to find pole and calculate center point
func GetNumOfPoint ¶
GetNumOfPoint return the number of point in las
func OpenLasFile ¶
OpenLasFile open las as read mode
func OpenLasHeader ¶
OpenLasHeader open las as read header mode
func PointBuffer ¶
PointBuffer create a square buffer around Point
func RemoveGround ¶
RemoveGround remove ground by using Voxelize method
func SplitbySourceID ¶
SplitbySourceID point cloud by sourceID
Types ¶
type Point ¶
type Point struct { *lidario.PointRecord3 M float64 // contains filtered or unexported fields }
Point struct for 3d point
func NewPointWithData ¶
NewPointWithData create point with xyz and m
type PointWorker ¶
type PointWorker struct { Input chan lidario.LasPointer Process process Wg *sync.WaitGroup }
PointWorker process Point from input
func NewPointWorker ¶
func NewPointWorker(input chan lidario.LasPointer, process process, Wg *sync.WaitGroup) *PointWorker
NewPointWorker create a new Processor
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader read Pointcloud
func (*Reader) CalculatePartSize ¶
CalculatePartSize return the size of each part for concurent running
type Splitter ¶
type Splitter struct { Input chan lidario.LasPointer Output []chan lidario.LasPointer }
Splitter copy one input point into several output channel
func NewSplitter ¶
func NewSplitter(input chan lidario.LasPointer, numOfOutput int) *Splitter
NewSplitter create splitter with output channel
type VoxelGrid ¶
type VoxelGrid struct {
XSize, YSize, ZSize int
CellSize float64
MinX, MinY, MinZ float64
Index [][][][]int // [x][y][z][len]
}
VoxelGrid store point index in Grid
func CreateVoxelGrid ¶
func CreateVoxelGrid(XSize, YSize, ZSize int, MinX, MinY, MinZ float64, CellSize float64) *VoxelGrid
CreateVoxelGrid of x y z
func GenerateVoxel ¶
GenerateVoxel from Lasfile
func (*VoxelGrid) Filter ¶
Filter out outside Point layer by layer using dbscan to find cluster if more than 1 cluster, cluster closest to center in picked if same distance, cluster with more point is pick
func (*VoxelGrid) FindCenterPoint ¶
FindCenterPoint return each layer center point
func (*VoxelGrid) IndexToGlobal ¶
IndexToGlobal calculate global coordinate form index
func (*VoxelGrid) RemoveBottomZVoxel ¶
func (grid *VoxelGrid) RemoveBottomZVoxel()
RemoveBottomZVoxel check for lowest voxel in each xy and remove it
func (*VoxelGrid) RemoveColumeByCount ¶
RemoveColumeByCount check for each xy colume and remove if total point is lower than threshold