Skip to main content
Question

Centroid polyline

  • September 8, 2018
  • 5 replies
  • 127 views

Forum|alt.badge.img

Hi all

simple question ...

I have a street network with polyline and I need to extract a centroid of polylines but the polylines are aggregates so if I use CenterPointReplacer I obtain the centroid but not on the polyline

 

Can you help please ?

 

In Arc also if the polyline are aggregates feature to pint create a centroid along the line.

 

Francesco

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

elpone
Contributor
Forum|alt.badge.img+4
  • Contributor
  • 19 replies
  • September 8, 2018

Hi @frsisani

My first thought is to use the snipper transformer using percentage and 50 for the start and end locations as this will create a point half way along the line but on the line unlike a centroid.

It is not clear if you want a point for each of the de-aggregated polylines or a point for the aggregated polylines. Attached is a sample workflow.

pointsonlinecentre-demo-acad2none.fmw is a 2018.1 workspace to do this.


Forum|alt.badge.img
  • Author
  • 12 replies
  • September 10, 2018

Hi @frsisani

My first thought is to use the snipper transformer using percentage and 50 for the start and end locations as this will create a point half way along the line but on the line unlike a centroid.

It is not clear if you want a point for each of the de-aggregated polylines or a point for the aggregated polylines. Attached is a sample workflow.

pointsonlinecentre-demo-acad2none.fmw is a 2018.1 workspace to do this.

Hi elpone

 

 

thx for reply

 

 

Maybe it's better to attach a small dataset to clarify my task

 

I used the snipper but if I use the options deggregate I obtain one point for every part of polyline my goal is to have only one point along line (it's not important to have the exact centroid but it's important to have the point along line and again just one point for the complete polyline).

 

 

thx

 

 

Francesco

 

rnr.zip

 

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • September 10, 2018
Hi elpone

 

 

thx for reply

 

 

Maybe it's better to attach a small dataset to clarify my task

 

I used the snipper but if I use the options deggregate I obtain one point for every part of polyline my goal is to have only one point along line (it's not important to have the exact centroid but it's important to have the point along line and again just one point for the complete polyline).

 

 

thx

 

 

Francesco

 

rnr.zip

 

 

Try a linecombiner after the deaggregator if you only want one point along each original line.

 

 


elpone
Contributor
Forum|alt.badge.img+4
  • Contributor
  • 19 replies
  • September 10, 2018
Hi elpone

 

 

thx for reply

 

 

Maybe it's better to attach a small dataset to clarify my task

 

I used the snipper but if I use the options deggregate I obtain one point for every part of polyline my goal is to have only one point along line (it's not important to have the exact centroid but it's important to have the point along line and again just one point for the complete polyline).

 

 

thx

 

 

Francesco

 

rnr.zip

 

 

Hi @frsisani,

 

I would suggest adding in a line combiner between the deaggregator and snipper transformer. In effect this will convert the mult-lines into a single combined object. In effect it removes pseudo nodes. Use the Group By to define what makes an object. If the de-aggreagation outputs are contiguous the line-combiner transformer will form a single polyline.

 

Hope that helps

  • 4 replies
  • September 15, 2018

Hi @frsisani,

how about using LineDivider from FME Hub? Please, have a look at this workspace:

Below result:

It works quite nice with lines. Unfortunately, gets a bit lost with some close loops or when line has more than 2 ends...