I have a point cloud (.ply format) that I got after using Structure from motion techniques (with MicMac). I would like to calculate its volume with r.report in GRASS. Will r.report work on a ply file? If not, how can I convert my file into something that will work with r.report?


You can import PLY files with v.in.ply which creates a GRASS GIS vector map from a PLY file (install v.in.ply with g.extension). Then you can set the computational region to this vector map, set an appropriate raster target resolution at the same time and convert or interpolate it to a raster map for the volume calculation.

  • 1
    I have used v.in.ply, but I have an error:ERROR: "Wrong number of properties", do you know how to deal with it? Also I am beginning on GRASS so can you be more precise on how to do the steps you are describing here? – Marion Brunet Jun 4 '18 at 4:35
  • Perhaps there are PLY subformats existing? Could you make (a fraction of) the file available? Hard to say otherwise... – markusN Jun 4 '18 at 22:12
  • Yes of course, how can I share it? I am beginning on this website too... – Marion Brunet Jun 5 '18 at 3:47
  • I saw you wrote to the grass-user list (lists.osgeo.org/pipermail/grass-user/2018-June/078374.html), very good. I hope and expect we'll get it sorted out – markusN Jun 6 '18 at 21:26
  • Yes, the problem is that I had white spaces at the end of every line, so GRASS counted it as another property. – Marion Brunet Jun 7 '18 at 4:52

As Marion mentioned in the comments of the other answer, this error can be caused by whitespace at the end of each vertex line. I'm adding an expanded answer so that google makes it easier to find.

In my case, I used Colmap to generate binary .ply, then MeshLab to convert the binary version to ascii. I used all combinations of options in MeshLab export, including and excluding face flags, flags, colors, and normals, and GRASS v.in.ply gave two different error messages:

ERROR: Wrong number of properties


ERROR: PLY faces must have only one property

The second occurs any time face properties are included, but the first is fixable by removing the trailing space on each line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.