I'm trying to import a .ply file from MeshLab 1.33 into GRASS GIS 7.0 using v.in.ply addon.

But I get the error message:

ERROR: List index must be integer, is uchar

This appears to be referring to the faces element of the file:

element face 50000
property list uchar int vertex_indices
property list uchar float texcoord

example data:

3 18598 18744 18713 6 0.376742 0.28305 0.376685 0.279639 0.378521 0.280493 

It appears to be reading the 3 references to the vertices (further up the file) as uchar not integers.

Yet they are integers and a scan of the file doesn't find anything else popping out?


Check that you have an ASCII PLY file. I just tried:

GRASS 7.0.0svn (nc_spm_08_grass7):~ > v.out.ply in=geodetic_pts out=bla.ply
GRASS 7.0.0svn (nc_spm_08_grass7):~ > v.in.ply in=bla.ply out=bla
Importing 29939 vertices ...
Building topology for vector map <bla@user1>...
Registering primitives...
29939 primitives registered
29939 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 0
Number of primitives: 29939
Number of points: 29939
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
v.in.ply complete.
GRASS 7.0.0svn (nc_spm_08_grass7):~ >

Looks all fine... But you write about faces: The manual states: "... v.in.ply is designed for large point clouds". Maybe the script needs to be expanded for more types. Can you make the file or a portion available?

  • Removed faces from file, and worked no problem. I'd done this once before, but obviously messed up the file somewhere. Cheers for this, appreciated. – user31054 Jun 10 '14 at 10:36
  • Could you prepare a minimalistic example with faces? Perhaps we could fix that then... – markusN Jun 11 '14 at 22:57

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.