Skip to main content
Question

How to convert 3D line segments to arcs?


makt
Contributor
Forum|alt.badge.img+1
  • Contributor

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

takashi
Supporter
  • April 30, 2016

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?


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • May 2, 2016

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.


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 2, 2016

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?


takashi
Supporter
  • May 2, 2016
makt wrote:

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?


pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • May 3, 2016

Hi,

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

Pratap


takashi
Supporter
  • May 3, 2016
makt wrote:

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.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • May 3, 2016

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

..and is not a aggregate.

takashi
Supporter
  • May 3, 2016
gio wrote:

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)


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • May 3, 2016

lol, it says bad geometry..but still

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

:)

makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 3, 2016

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?


takashi
Supporter
  • May 4, 2016
gio wrote:

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 ;)


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 6, 2016

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.


mark2atsafe
Safer
Forum|alt.badge.img+43

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.


Forum|alt.badge.img+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.


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