Question

How to convert 3D line segments to arcs?


Badge

I tried using ArcEstimator, which only works with 2D features. After converting to 2D with 2DForcer, ArcEstimator ended up rejected all my 2D line segment features - not sure why.

These segments were not originally arcs - so that may be an underlying problem. This also means I don't have arc parameters in the attribute table, so 3DArcReplacer is not an option.

I'm also not too confident that ArcEstimator will be my best bet given that the help file states "The result is an approximation only and unless the linear feature is previously known to be circular, the result could be completely different than the original feature". That being said, the image in the same help file does show exactly what I am looking to do:


14 replies

Userlevel 2
Badge +17

Hi @makt, depending on the original line shape, the ArcExtimator may not be able to estimate arc properties. For example (a typical case), if all vertices of the input shape are on a straight line, the transformer would reject that. How are your original line shapes?

Badge +3

maybe the polyline was or had a aggregate or there were polylines with less then 3 vertices?

Those are 2 known reasons for 2Destimator rejection.

Badge

Hello - the input file has many points along one long road. Some portions of the road are indeed straight, while others are just like the above picture. Sounds like this may be a trickier task than I initially thought?

Userlevel 2
Badge +17

Hello - the input file has many points along one long road. Some portions of the road are indeed straight, while others are just like the above picture. Sounds like this may be a trickier task than I initially thought?

@makt, for instance, the ArcEstimator can estimate an arc from the left shape, but will reject the right shape. How is your input shape?

Badge +2

Hi,

Its better, if you post some selected data to give a try rather than assumptions.

Pratap

Userlevel 2
Badge +17

Hello - the input file has many points along one long road. Some portions of the road are indeed straight, while others are just like the above picture. Sounds like this may be a trickier task than I initially thought?

@makt, do you perhaps expect that the ArcEstimator splits a single polyline to extract arc-shape parts? If so, unfortunately it doesn't work as expected. This transformer tries to estimate the entire line as a single arc, and then will reject the line if it is not an arc-shape as a whole. The right image in my previous post illustrates such a rejecting case.

Badge +3

Acxtually it can estimate any polyline \\ as long as it has more then 3 vertices...

..and is not a aggregate.
Userlevel 2
Badge +17

Acxtually it can estimate any polyline \\ as long as it has more then 3 vertices...

..and is not a aggregate.

@gio, I don't think it is so always. sample.zip (GeoJSON)

Badge +3

lol, it says bad geometry..but still

after a bit fiddling...i got one of your polylines to arc...!

:)
Badge

Hi - thanks for the input everyone. The types of points that I have (and the type of arc(s) that I'd like that have go through them) are effectively similar to the picture below (source):

Basically the line that connects the points is not a set of straight lines, but incorporates curves while also going through all the points.

After looking through your examples of using ArcEstimator, and some double checking on my part, it seems that it is not possible to use ArcEstimator to output separate arcs for each line segment that have more than 4 vertices; no matter how many line segments are in the input, the output is always one arc (actually I found my output to be one big circle).

Is there perhaps a different transformer to try?

Userlevel 2
Badge +17

lol, it says bad geometry..but still

after a bit fiddling...i got one of your polylines to arc...!

:)

yup, I agree that the ArcEstimator can estimate arc for almost all general lines ;)

Badge

Thanks takashi - I'll try tinkering with the Generalizer settings to see if I can get any good output that would come close to what I'd like to end up with.

Looks like a managed to come across a rare case of FME not readily being able to do a transformation task. I figure if I really needed to do this I could use some python libraries.

Userlevel 4
Badge +25

You may want to consider the CurveFitter. From its help:

Smooths lines derived from line segments, points or raster data, and replaces a series of line segments with the optimal combination of straight lines and embedded arc segments required to create smooth curving lines.

The only snag:

The Curvefitter transformer is based on linear optimization technology licensed fromTCI Corp. It is available for purchase as an add-on to premium editions of FME. Please contact.

Still, I think it would do what you want, and you may be able to get a trial first. Do what it suggests and contact the sales team for more info.

Badge +2

As Mark2AtSafe suggests - you should look at the CurveFitter. It is an extra-cost transformer. You can contact your FME sales representative to obtain an evaluation license to ensure it does meet your needs before you purchase.

Reply