From 5d6ad6612db74e366f3cfa506b6a40f4aa831757 Mon Sep 17 00:00:00 2001 From: dehann Date: Fri, 22 Sep 2023 12:25:16 -0700 Subject: [PATCH] lasio ext and new test --- ext/CaesarLasIOExt.jl | 6 +++++- ext/services/LasIOSupport.jl | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ext/CaesarLasIOExt.jl b/ext/CaesarLasIOExt.jl index 5dbc10fbd..4eb277596 100644 --- a/ext/CaesarLasIOExt.jl +++ b/ext/CaesarLasIOExt.jl @@ -1,9 +1,13 @@ module CaesarLasIOExt using LasIO +using FileIO +using Dates +using StaticArrays + import Caesar._PCL as _PCL -import Caesar: loadLAS, saveLLAS +import Caesar: loadLAS, saveLAS include("services/LasIOSupport.jl") diff --git a/ext/services/LasIOSupport.jl b/ext/services/LasIOSupport.jl index 37de0e56d..20ab56e41 100644 --- a/ext/services/LasIOSupport.jl +++ b/ext/services/LasIOSupport.jl @@ -25,15 +25,15 @@ function loadLAS( RGB(pnt.red, pnt.green, pnt.blue) end - colored_points = PointXYZ.(colors, pts) - return PointCloud(;points=colored_points, width=UInt32(length(colored_points)), height=UInt32(1)) + colored_points = _PCL.PointXYZ.(colors, pts) + return _PCL.PointCloud(;points=colored_points, width=UInt32(length(colored_points)), height=UInt32(1)) end # TODO, make save LAS function saveLAS( filepath::Union{<:AbstractString, <:Stream}, - pc::PointCloud; + pc::_PCL.PointCloud; scale=1000 )