Hello there
how could we move the blue line in order to make it parallel to the read one?
Hello there
how could we move the blue line in order to make it parallel to the read one?
Hi @boubcher , take a look at the OffsetCurveGenerator transformer.
Hi @boubcher , take a look at the OffsetCurveGenerator transformer.
@Takashi Iijima
the transformer creates a parallel line right and left to the same line input, in our case, we have 2 input lines blue and read and we need to make the blue line parallel to the read line. could u advise
thanks
Hi @boubcher , take a look at the OffsetCurveGenerator transformer.
Unfortunately you provide too little information for a helpful answer.
At what distance from the blue line should the red line be? The (orthogonal) distance of the starting point of the red line from the blue line? Or the (orthogonal) distance of the end point? Or maybe the (orthogonal) distance of the middle of the red line from the blue line? Or even the (orthogonal) distance of the middle of the blue line from the red line? Or some other distance?
Should the length of red line be changed to te same length as the blue line?
Hello @boubcher , I think you can use the AnchoredSnapper to snap blue line to red, and then use an Offsetter to offset on y-axis (eg. move it down)? Best, Kailin.
For each line calculate its bearing (HorizontalAngleCalculator). Use the NeighbourFinder to copy that attribute across from the red line to the blue line. This will mean the blue line will have attributes of the distance, direction between the lines, and the bearings of each line. From that you can use a Rotator (rotate by the difference in bearings) or Offsetter to move the lines to get what you need.
For each line calculate its bearing (HorizontalAngleCalculator). Use the NeighbourFinder to copy that attribute across from the red line to the blue line. This will mean the blue line will have attributes of the distance, direction between the lines, and the bearings of each line. From that you can use a Rotator (rotate by the difference in bearings) or Offsetter to move the lines to get what you need.
I am getting some weird number of the angle value there is a large difference but as you can see they are close to each other is there any reason
because if we rotate as suggested by the diff angle, the blue line will go to another country
I am getting some weird number of the angle value there is a large difference but as you can see they are close to each other is there any reason
because if we rotate as suggested by the diff angle, the blue line will go to another country
There's two things - lines which are drawn in an opposite direction will have an azimuth 180 degrees from each other, so the difference between the two is: 89 - (268-180), which is only 0.93499761. If you're doing this for a lot of lines, you'll need some conditional statements to keep the values between 0 and 180, such as if an azimuth is greater than 180, subtract it by 180.
Then the rotator's default behaviour is to use 0,0 as the centre of rotation. So you'll need use a coordinate extractor to get the coordinate to rotate around, like the line's first vertex, or its centrepoint.
I am getting some weird number of the angle value there is a large difference but as you can see they are close to each other is there any reason
because if we rotate as suggested by the diff angle, the blue line will go to another country
Yes you are right all work good now , Thanks for your help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.