Skip to main content
Question

How to offset line vertices along the direction of the line?

  • January 8, 2015
  • 4 replies
  • 118 views

makt
Contributor
Forum|alt.badge.img+1
  • Contributor
I have a shp file of points along a path. For each point, I would like to have a new related point that is:

 

a) off set a meter to the left AND

 

b)  offset by a meter "behind" (in the direction of the line) 

 

 

I have done part a) by converting the points to a line using PointConnector and then using OffsetCurveGenerator and VertexExtractor to arrive at a point that is 1 meter to the left. However, I'm not sure how to tackle b) - how can I further offset this point along the direction of the line itself? 

4 replies

takashi
Influencer
  • January 9, 2015
Hi,

 

 

One idea.

 

1) Connect the points with the PointConnector, like the solution for part a).

 

2) Chop the line into individual line segments with the Chopper.

 

Mode: By Vertex

 

Maximum Vertices: 2

 

3) Transform each line segment into a point behind one meter from its start node, along itself, by the Snipper.

 

Snipping Mode: Distance (Value)

 

Starting Location: 1

 

Ending Location: 1

 

 

Takashi

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 9, 2015
You can also use a PointOnLineOverlayer to chop up the line. Claculate the length of the pieces with Lenghtcalculator.

 

Now on the original line you offsetted, use a snipper and use the length + 1 meter starting form start (i assume vertexnr. = 0)

 

By making the snipper iterative (custom loop) you can repeat snipping process on the remnant tus moving all points.

 

After that extract the endnodes ( and the sart noed) or visa versa.

 

This will "move" them 1 meter along the line (you can even do that with curves/splines)

 

Create a

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 9, 2015
You can do this also using a cloner in stead of a looped snipper btw.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 12, 2015
Here is a workspace using iterative snipping (this one is doen on a spline):

 

 

 

and the custom snipper:

 

 

 

 

Result, points moved 20 units along line: (exept 1st and last point. You could do 1st too if you'd wanted too of course)

 

 

 

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings