Skip to content

Pipeline from scala-constructed pointcloud #22

Description

@kervel

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions