Solved

Create 3d parallel polylines

  • 13 September 2019
  • 11 replies
  • 25 views

Badge +5

Hi!

I'm looking to create some 3d parallel offsets of existing 3D polylines. My end goal is to actually create a polygon a certain width around a polyline but it must retain the 3d elevations. I've looked into the following tools: Offsetter, OffsetCurveGenerator, Buffer and 3DBufferer. All of these are close however don't quite get me there. The buffer is perfect however is only 2D. I do not know how to then restore the elevations so that it retains its 'parallel figure'. Note that the vertices of the 3D polys have different values, they are not all the same value, ie goes up and down.

Any suggestions?

Buffer result:

Buffer result 3D view:

icon

Best answer by jdh 13 September 2019, 16:45

View original

11 replies

Badge +16

Hi @umapper1,

The Bufferer in FMe 2019.+ can also be used for 3D:

Buffer Type : Specify whether to create Area (2D) or Solid buffers around input features.

Which FME version are you using?

Badge +5

Hi @umapper1,

The Bufferer in FMe 2019.+ can also be used for 3D:

Buffer Type : Specify whether to create Area (2D) or Solid buffers around input features.

Which FME version are you using?

Yes I saw this too! Unfortunately it's not what I'm trying to achieve. This is what made look at alternatives like the OffsetCurveGenerator. I'm really chasing a 3d area derived from the centre line polyline. I'm currently using 2019.

Badge +16

Yes I saw this too! Unfortunately it's not what I'm trying to achieve. This is what made look at alternatives like the OffsetCurveGenerator. I'm really chasing a 3d area derived from the centre line polyline. I'm currently using 2019.

Can you explain what is a 3D area derived from the centre line?

Badge +5

Can you explain what is a 3D area derived from the centre line?

A closed polyline with z values on the vertices. If it's still difficult to understand I can draw both the starting data and desired result in CAD if you like?

Badge +5

It is a bit of a pain because it depends on your turns. Do some tests with offsetCurveGenerator and you will see that there is no 1:1 relationship between the vertices on left and right compared with the central one in some cases so you cant really force the same z value.

 

You could create a 3d surface using multiple methods and then drape your buffer on it. You could also extract the vertices of your buffer, look at the original elevation of the closest vertex from the original line, set them to this elevation and rebuild your polygon.
Badge +22

I was chasing the same thing last week, with limited success. What I ended up doing was buffering the line in 2D then sending it to the DrapeFeatures of the SurfaceDraper, while the original 3D line was sent to the Points/Lines port. Use a group-by so that each feature creates it's own independent surface model.

Badge +22

I was chasing the same thing last week, with limited success. What I ended up doing was buffering the line in 2D then sending it to the DrapeFeatures of the SurfaceDraper, while the original 3D line was sent to the Points/Lines port. Use a group-by so that each feature creates it's own independent surface model.

For those having difficulty visualizing, the object is to turn the 3D line (blue) into a 3D polygon (red) such that the z is constant perpendicular to the line.

 

 

Badge +22

Alternatively,

 

 

Buffer the line in 2D, Chopper (1 vertex) you now have 2D points, send these to the Base port of a NeighborFinder.

Take your original line and Chop it into points (3d), use a coordinateExtractor to store the Z value as an attribute. Send that to the Candidate port of the NeighborFinder

NeighborFinder should have 1 Neighbor to Find, and Merge Attributes set.

On the Matched port use a 3DForcer to set the Z value of the points. Then use a LineBuilder to turn the 3D points into a polygon

 

Userlevel 1
Badge +10

Alternatively,

 

 

Buffer the line in 2D, Chopper (1 vertex) you now have 2D points, send these to the Base port of a NeighborFinder.

Take your original line and Chop it into points (3d), use a coordinateExtractor to store the Z value as an attribute. Send that to the Candidate port of the NeighborFinder

NeighborFinder should have 1 Neighbor to Find, and Merge Attributes set.

On the Matched port use a 3DForcer to set the Z value of the points. Then use a LineBuilder to turn the 3D points into a polygon

 

A densifier before chopping the the line may improve the output.

Badge +5

Legends, thanks for the feedback all!

@jdh this was my thinking using the neighbourfinder. My only concern was if I had a complex data set with crossing lines etc. The neighbourfinder may then pick up the wrong points. Although if I gave each string a unique id to start with this might help with the filtering? I might try the feature draper option first, thanks for making the point of using the 'group by' option. This is what had me stuck when I saw a similar post.

Badge +22

Legends, thanks for the feedback all!

@jdh this was my thinking using the neighbourfinder. My only concern was if I had a complex data set with crossing lines etc. The neighbourfinder may then pick up the wrong points. Although if I gave each string a unique id to start with this might help with the filtering? I might try the feature draper option first, thanks for making the point of using the 'group by' option. This is what had me stuck when I saw a similar post.

Yes, in any scenario I would recommend creating a unique ID per line feature (Counter) and use it as a group-by.

Reply