Page 1 of 1

Extract Section (using Polyline) in command line

Posted: Thu Jun 22, 2017 11:23 am
by everydayduffy
Hello,

I want to read in a .las point cloud and .dxf polyline and perform an extraction as done with the Segmentation -> Extract Sections tool, to obtain the points falling under/over the polyline.

Can this be done with the command line?

Is it possible with the Cross Section tool (-CROSS_SECTION {XML parameters file})?

If so, how does one create an xml file for use with this tool please?

Kind regards

James

Re: Extract Section (using Polyline) in command line

Posted: Fri Jun 23, 2017 7:06 am
by daniel
Hi,

For the records, there's an example of an XML file that should be passed to the Cross Section tool on the wiki page of the command line tool (here is the direct link: http://www.cloudcompare.org/doc/cross_s ... params.xml).

However, this tool is quite different from the "Section extraction tool" (it is meant to "slice" a point cloud in a box). Making the section extraction tool available through the command line is not impossible but would require some good programming skills.

Re: Extract Section (using Polyline) in command line

Posted: Fri Jun 23, 2017 7:46 am
by everydayduffy
Hello,

Thanks for your reply.
daniel wrote:Hi,

For the records, there's an example of an XML file that should be passed to the Cross Section tool on the wiki page of the command line tool (here is the direct link: http://www.cloudcompare.org/doc/cross_s ... params.xml).
I did see your example, but given that the command line could be used to batch process, I wondered if you had a way of producing lots of xml files with different parameters in each one?
daniel wrote: However, this tool is quite different from the "Section extraction tool" (it is meant to "slice" a point cloud in a box). Making the section extraction tool available through the command line is not impossible but would require some good programming skills.
Skills that unfortunately I don't have. Is there anyway that the cross section tool can slice the point cloud in a similar way to the section extraction tool?

My main task here is to repeatedly extract different transects from the cloud. Any advice on how to achieve this would be much appreciated.

Just for context I have a cloud spanning 100x100m and I wish to select many transects of 10m (which can be defined by .dxf files made in GIS).

Kind regards

James

Re: Extract Section (using Polyline) in command line

Posted: Fri Jun 23, 2017 9:25 am
by daniel
Are you referring to the function that extracts the points close to a polyline? Without any profile extraction?

Then it would work the same as the cross section tool if there's only two vertices in the polyline (i.e. a simple segment). And you can't use the DXF file either...

Re: Extract Section (using Polyline) in command line

Posted: Wed Jun 28, 2017 8:37 am
by everydayduffy
daniel wrote:Are you referring to the function that extracts the points close to a polyline? Without any profile extraction?

Then it would work the same as the cross section tool if there's only two vertices in the polyline (i.e. a simple segment). And you can't use the DXF file either...
I was just looking for a way to extract the closes points to a polyline multiple times. But no problem, I found a way to do this in R with nearest neighbour analysis on an xyz point cloud file.

Thanks

Re: Extract Section (using Polyline) in command line

Posted: Wed Feb 07, 2018 2:47 pm
by jblackmore00
I think i am trying to do something similar.... which i feel should be a pretty common workflow.

I have a closed polygon in AutoCAD format that i would like to bring into CC and use as the bounding polygon to segment a point cloud. I know how to draw a box or polygon in CC, but i'd like to import one and use that. Is that possible?

I'm planning to use that bounding polygon to segment multiple point clouds and compare volumes between point clouds within the polygon. I'm trying to be consistent with measuring the same area each time.

Thanks-
John

Re: Extract Section (using Polyline) in command line

Posted: Sun Feb 11, 2018 8:08 pm
by daniel
It's possible to use a custom polygon in the 'scissors' tool (use the second icon of the segmentation tool: it looks like a polyline and the tooltip is 'Import polyline from DB for segmentation'). Make sure the viewport corresponds to the polyline dimensions (i.e. viewing direction is Z if the polygon is in the (XY) plane).