Extract Section (using Polyline) in command line

Feel free to ask any question here
Post Reply
everydayduffy
Posts: 5
Joined: Wed Jun 07, 2017 2:52 pm

Extract Section (using Polyline) in command line

Post 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
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract Section (using Polyline) in command line

Post 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.
Daniel, CloudCompare admin
everydayduffy
Posts: 5
Joined: Wed Jun 07, 2017 2:52 pm

Re: Extract Section (using Polyline) in command line

Post 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
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract Section (using Polyline) in command line

Post 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...
Daniel, CloudCompare admin
everydayduffy
Posts: 5
Joined: Wed Jun 07, 2017 2:52 pm

Re: Extract Section (using Polyline) in command line

Post 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
jblackmore00
Posts: 1
Joined: Wed Feb 07, 2018 2:33 pm

Re: Extract Section (using Polyline) in command line

Post 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
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract Section (using Polyline) in command line

Post 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).
Daniel, CloudCompare admin
Post Reply