Question

oriented 2D grid for a line

  • 22 April 2020
  • 2 replies
  • 7 views

hey

 

i am trying to do a 2D grid that is originated on the same angle of a line as an input feature,

while i could do distance chopper on the line and an oriented boundary box, this doesn't give me the control i require to maintain the same polygon size. the 2D grid creater allows me to define the cell size within the grid but doesn't allow me to orientate it to the input feature

maybe i could do a start point, end point of the input feature, then draw a line, get the angle and rotate the grid? the challenge with this approach is that the line is not straight, so the grid needs to follow the line and not just the start and end points

any advise would be grand

many thanks

James


2 replies

Badge +12

Hi @fungry21

 

 

I am not sure I understand what you mean by "the grid needs to follow the (not straight) line and not just (align with) the start and end points"?

 

 

Do you want to chop the line up at every vertex and create a rotated grid for each segment of the line, so that you get a number of differently oriented grids?

 

 

Just orienting a grid is a bit tricky; it seems you need to attach some rotation angle attribute to the grid first. I did a quick attempt to just orient a grid from the rotated bounding box of a not-straight line (see attached workspace), but did not manage to get the rotation angle attribute to "remain" during the 2D grid accumulation transformer, so I had to merge it again afterwards. I guess this is not exactly what you are looking for, but it might give you some ideas.

rotategrid.fmw

 

 

Userlevel 2
Badge +12

Would it be an option to create a grid (not oriented) using the 2DGridCreator.

Then use a Bufferer transformer to create a polygon (the buffered area around the line).

Finally get the part of the grid inside the buffer, using the Clipper transformer.

Hope this helps.

Reply