Skip to main content
Question

Start, Mid and End point from Line and Polygon dataset


I want to get the Start, Mid and End point from:

 

1. A line dataset (Roads)

2. A polygon dataset (Roads)

 

What is the easiest way to process this?

 

(The polygon dataset is in the shape of roads, so looking at the start, mid and end point of the road as we see it!)

3 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • November 8, 2022

One way is with a few Snipper transformers, setup as the screen shot below. '0' is the first vertex, '-1' is the ending vertex, and you can use the Distance (percentage) mode to get the mid-point (50%). For the polygons, you can use the CenterlineReplacer first, and then send those linear features through the same process.image


  • Author
  • November 8, 2022
dustin wrote:

One way is with a few Snipper transformers, setup as the screen shot below. '0' is the first vertex, '-1' is the ending vertex, and you can use the Distance (percentage) mode to get the mid-point (50%). For the polygons, you can use the CenterlineReplacer first, and then send those linear features through the same process.image

Thank you @dustin​  I'll try this out


Forum|alt.badge.img+2
  • November 8, 2022

@saqib.amin​  a combination of CenterPointExtractor and a pair of CoordinateExtractor's should do the trick. For polygons, use GeometryCoercer to coerce the polygon into line otherwise you'll get the center of the area instead of along the line


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