Skip to content

API for returning scaled and offset point cloud #34

@Crghilardi

Description

@Crghilardi

I was messing around and ran into a situation where I wanted to get the scaled and offset float point cloud to use with NearestNeighbors.jl.

I can use the the convert function provided by the package, but then I have an Array{Point{3,Float64},1} and lose access to all the metadata and other convenience functions like classification().

using FileIO, LasIO
header, points = load("points.las")

using GeometryTypes
pc_scaled = map(x-> Base.convert(Point{3, Float64},x, header), points) #Array{Point{3,Float64},1}

The code above works fine for my toy problem, but I wanted to ask about design thoughts for adding this.

The ability to expose scaled and offset coords to users was discussed briefly in this LasIO issue.

After reading through src a bit, it looks like it would at least require a new type at least since all the x,y,z fields are ::Int? Not sure if any of the work over in GeometryBasics/GeometryTypes can be leveraged to simplify anything.

Maybe related issue in PointCloudRasterizers? and I also know about GeoAcceleratedArrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions