Page 1 of 1

Crop2D command line syntax for complex shapefiles

Posted: Sun Jul 26, 2015 11:48 pm
by Colinmazengarb
Hi All,

I am looking into the possibility of cropping large point clouds with the crop2d function in command line mode. My aim is to be able to call this from other programs to overcome the efficiency issues within ArcGis.

I understand the syntax for the function requires listing the vertice coordinates in their order for the clipping geometric feature in question, and this is easy for simple geometries such as a triangle or rectangle. However, can CC crop complex geometries involving donut holes and multiple features (e.g. Several isolated triangles) and what would the syntax look like? Also, is there a limit to the number of vertices that can be placed in a command line statement?

If anyone has alternative methods of cropping very large point clouds in an efficient manner in other GIS or 3D software I would be interested to know.

Regards to you all.
Colin

Re: Crop2D command line syntax for complex shapefiles

Posted: Mon Jul 27, 2015 8:45 pm
by daniel
Hi,

You should be able to input as many vertices as you want for each cropping polygon. And you can call the 'cropping' method multiple times (with different polygons) in a single call to CC (command line). However you can only crop the points inside the polygon. So if you have a shape with holes it might be a bit complicated...

Daniel

Re: Crop2D command line syntax for complex shapefiles

Posted: Sun Aug 02, 2015 2:03 am
by Colinmazengarb
Thanks Daniel,

I am wondering then if I could add to the wish list a functionality to remove points within a polygon? This would be the opposite to the existing functionality in command line mode.
The other wish is to perform a segmentation on a complex shapefile as outlined in my original post. However maybe I could create a python script to build the command line call but it would need the former wish list functionality to make it less challenging.

Cheers
Colin

Re: Crop2D command line syntax for complex shapefiles

Posted: Fri Aug 14, 2015 6:15 am
by daniel
Okay I'll add the first one to the TODO list (I bet you want to keep the points OUTSIDE of the polygon?).

And indeed it would be simpler to make a script for the second one because the job would be a bit too specific to SHP files (especially for the way inside and outside borders are defined - there's no such thing in CC).

Re: Crop2D command line syntax for complex shapefiles

Posted: Sun Aug 16, 2015 12:58 pm
by daniel
Oh, I just realized the CROP and CROP2D options of the command line mode already have a 'OUTSIDE' option (see http://www.cloudcompare.org/doc/wiki/in ... _line_mode).