-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Hello,
i couldn't find documentation so far. My problem is that i have a dataset that can be converted to a pointcloud. I do the conversion as follows:
def toPointCloud(sweeps: Seq[Tuple3[Coordinate, Double, Seq[XZ]]]): PointCloud = {
// the Double in the tuple3 is the azimuth.
val points = sweeps.map(gs => projectSweep(gs._3, gs._2, gs._1)).
reduce((a,b) => DenseMatrix.horzcat(a,b))
var v = new util.HashMap[String, SizedDimType]()
v += "X" -> SizedDimType(DimType.X, java.lang.Double.BYTES, 0)
v += "Y" -> SizedDimType(DimType.Y, java.lang.Double.BYTES, java.lang.Double.BYTES)
v += "Z" -> SizedDimType(DimType.Z, java.lang.Double.BYTES, 2*java.lang.Double.BYTES)
val bos = ByteBuffer.allocate(points.cols * points.rows * java.lang.Double.BYTES).order(ByteOrder.nativeOrder());
val ios = bos.asDoubleBuffer();
ios.put(points.copy.data)
return new PointCloud(bos.array(), v)
}
i verified and the pointcloud seems to be okay (i can get points out of it). I'd like to create a PDAL pipeline now using this pointcloud so that i can reproject/persist/... it.
Is there a way to do this ?
greetings,
Frank