Page 1 of 1

generating polyline based on terrain distance

Posted: Sun Mar 04, 2018 7:18 am
by KI123
Hi, first of all thank you for the fantastic software. i am new but trying hard to figure out things.

i wanted to ask whether there is a method for generating a polyline based on certain distance.
i have some point cloud data taken from LiDAR to generate terrain information of the area.
i want to draw a straight line for say 100 m but along the terrain surface. so in flat area it would be similar when line is generated in space
but with rugged terrain, same 100 m should be a bit distorted and would be shorter when looked on 2D view.

this is first question, if this can be done with cloud compare? i have been searching the forum and in the software but i can only find picking points or drawing lines, sorry if i overlooked

second is on the base of the drawn line, is it possible to generate points per lets say, distance intervals (generate point per 1 m distance along the line).

even if it is impossible, i will be happy to hear any comments for to doing this alternatively.

sorry if my English is not good
thank you so much for the help

Re: generating polyline based on terrain distance

Posted: Sun Mar 04, 2018 5:18 pm
by daniel
Hi,

For your first need, you should take a look at the 'Trace polyline tool' (http://www.cloudcompare.org/doc/wiki/in ... e_polyline). Look at the cloud from above, trace your line, and then don't forget to increase the 'Oversample' parameter to get a good fit to the terrain.

And sadly, there's no way currently to sample points on the polyline (even though it wouldn't be too hard to make such a method). Nevertheless, the generated polyline vertices will be regularly sampled (based on the oversample parameter). But it would be only in the '2D' space I believe (not on the 3D line)

Re: generating polyline based on terrain distance

Posted: Sat Mar 10, 2018 12:22 am
by KI123
daniel

thanks for the note ! ill check it out. looks like that should work out.
too bad there is no function for the point generation, but hope we could see some tool coming up in the future, thanks

Re: generating polyline based on terrain distance

Posted: Fri Mar 16, 2018 5:46 pm
by daniel
Just in case, the latest 2.10.alpha version (online) now has a 'Edit > Polyline > Sample points' tool!

Re: generating polyline based on terrain distance

Posted: Fri Apr 06, 2018 5:36 am
by KI123
Dear daniel

thanks for the update. I was exploring and the function was really good for my purpose.
just one thing i had in mind was when you generate a sample point, the coordinates becomes to the shifted coordinates (not the original coordinates)
is there a way to change this to the original cooridinate? thanks

oh and the trace polyline has worked as my expectations also.
but it is little difficult to generate good lines. is it better to generate one long line, or to seperate into smaller few lines ?
because when one long line is made, after checking it with oversampling, the traced line gets corrupted. im drawing a line based on point cloud.
but when i make smaller lines it sometime works ok, so i will try it that way. truely thanks !

Re: generating polyline based on terrain distance

Posted: Fri Apr 06, 2018 7:23 am
by daniel
1) The polyline sampling tool should keep the global coordinates (but they will only show up at export time). Can you maybe send me a sample polyline with big coordinates so that I can check on my side?

2) You can get dirty 'oversampled' polylines if the density of the cloud is low, or if the 'snap size' is too big (you can try with 1 first and see how it goes).

Re: generating polyline based on terrain distance

Posted: Fri Apr 06, 2018 11:36 am
by KI123
daniel

thank you very much for the suggestion.

for the data should i directly upload the polyline?
i have a base point cloud in UTM zone, and after generating trace polyline, the global shift parameter changes to 0;0;0
original is like (111111.11;2222222.22;0)


edit:
i will try to use the EDIT > Edit global Shift and Scale

Re: generating polyline based on terrain distance

Posted: Fri Apr 06, 2018 11:50 am
by daniel
You can send me the file to 'admin [at] cloudcompare.org'. I'll fix the bug asap.

Re: generating polyline based on terrain distance

Posted: Sat Apr 07, 2018 3:01 am
by KI123
thank you
i have sent the file

Re: generating polyline based on terrain distance

Posted: Mon Apr 09, 2018 9:32 pm
by daniel
Okay I fixed the issue. And I've updated the online 2.10.alpha version.

Thanks for the feedback!