Hello there
we are a series of building points in each side of the road we need to move all the points to the same distance on each side of the road
Actual Status
Target
Hello there
we are a series of building points in each side of the road we need to move all the points to the same distance on each side of the road
Actual Status
Target
An idea:
If you use the NeighborFinder you should then be able to use the attributes that are generated (distance and angle) in an offsetter in polar coordinate mode.
EDIT: VertexCreator is not needed, see comment by ebygomm below.
@ebygomm Great idea! Calculating points at a fixed distance from the line then goes like this:
You may want to check for points that are not projected perpendicularly onto the line.
EDIT: VertexCreator is not needed, see comment by ebygomm below.
@ebygomm Great idea! Calculating points at a fixed distance from the line then goes like this:
You may want to check for points that are not projected perpendicularly onto the line.
No need for the VertexCreator, you can just offset the existing points
No need for the VertexCreator, you can just offset the existing points
You are absolutely right, I made it too complicated.
EDIT: VertexCreator is not needed, see comment by ebygomm below.
@ebygomm Great idea! Calculating points at a fixed distance from the line then goes like this:
You may want to check for points that are not projected perpendicularly onto the line.
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
Nope, that was me offsetting the line vertex. ebygomm moves the original point, which results in a simpler workspace.
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
sorry,
but when using only the offset it's not working since we are deducing the same value for the distance
we need a fixed distance
Please check the attached WS
Thanks
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
You are mixing my and ebygomm's ideas, with disastrous results.
ebygomm offsets the original point, using _angle. I offset the projected point on the line in the reversed direction, thus using _angle+180 .
I should have kept out of this one, as ebygomm's solution was good, and my 'improvements' only lead to confusion.
Note that the NeighborFinder will not give the perpendicular projected point for points whose perpendicular projection falls outside of the line segment, instead it will find the first (or last) vertex of the line.
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
You need to offset by the distance produced by the neighborfinder minus the fixed distance value you want
So if your original point was 50 m away you offset by 50-20 (@Value(_distance)-20) which would move the point 30m closer to the line so it ends up being 20m away from the line
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
So sorry, I am missing something here the output value for the offset is not the same for each vertex how come they are at the same distance from the line
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
All points get the same distance from the line by calculating @Value(_distance)-20, as @ebygomm explained above. You move the point over the calculated distance towards the line (because the direction indicated by _angle is towards the line).
So when _distance is larger than your fixed distance (20 in this example) the point will be moved towards the line, and when _distance is smaller than your fixed distance, the point will be moved away from the line.
All credits for this solution should go to ebygomm. I apologize for muddying a perfect solution.
That's a brilliant approach, you are offsetting the line vertex not the original point, Great
Why are you adding to the angle 180 ?
Sorry, I think I am missing something, how come the offset is different in value for each vertex but their position to the line is the same
Note that the NeighborFinder will not give the perpendicular projected point for points whose perpendicular projection falls outside of the line segment, instead it will find the first (or last) vertex of the line.
I totally agree with you, but still I am not getting, how come the offset value is different for each vertex and on the map, they are at the same the same distance from the line , as you can see in the table view
Hi @boubcher , I was away from work for over a week, so my apologies for this late answer.
In @ebygomm 's solution, the offset is calculated from the original vertex, with the positive direction away from the corresponding point on the line.
Thats fine and welcom back
Well you are right ,I don't know how I missed it
Thanks for the illustration