Skip to main content
Question

How to stroke arcs down to straight lines


frantsch
Contributor
Forum|alt.badge.img+3

I need to stroke arcs (within polygon geometries) down to straight lines (startpoint directly connected to endpoint, no additional vertices). How am I to realize this?

When I use ArcStroker with 'Number of Interpolated Edges' = 0, it would automatically interpolate a reasonable number of edges. However, when I choose 'Number of Interpolated Edges' = 1, it would add one more verex (edge). Any ideas with other than that transformer?

4 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 31, 2016

Hi @frantsch, I think the ArcStroker (Number of Interpolated Edge: 1) should work to transform an arc into a single line segment between the start and end nodes. However, the result you have observed is reasonable if the input 'arc' consists of consecutive two arcs actually. Firstly check whether the 'arc' is a single arc feature.


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • May 31, 2016

I found that the ArcStroker strokes the 'arc' for each segment if the geometry is a path consisting of multiple arcs. If the input arc is a path containing two arc segments, try transforming it into a single arc by the ArcEstimator before stroking.


frantsch
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • May 31, 2016
takashi wrote:

I found that the ArcStroker strokes the 'arc' for each segment if the geometry is a path consisting of multiple arcs. If the input arc is a path containing two arc segments, try transforming it into a single arc by the ArcEstimator before stroking.

Yes, you are right. All the arcs in my geometries consist of two consecutive arc segments, that was why I obtained those intermediate vertices. Thank you, Takashi!


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 31, 2016

If the ArcStroker results in a line with multiple vertices, you can extract the first (index = 0) and last (index = -1) coordinates from the line. Then you can replace the line with a straight line by using these coordinates. If the line has 3 vertices you can also remove the middle vertex (index = 1) using the CoordinateRemover.


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