Skip to main content

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

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


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


@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


Reply