Skip to main content

Hi,

I have a set of lines that make up a set of polygons. Is
there a way to separate lines that goes around the edge of data set? (see
picture below, only yellow lines)

Thank you.

One way could be to try the AreaBuilder followed by the Dissolver and then the GeometryCoercer set to fme_line.


One way could be to try the AreaBuilder followed by the Dissolver and then the GeometryCoercer set to fme_line.

Perfect. That do the trick. Thank you @david_r.

 


Sorry, @david_r it only gave me one line. I need all the lines that make that one big polygon.


The result will depend on how accurately the lines are connecting, the should be 100% topologically correct for this to work. You may want to try a Snapper (segment snapping) with a small tolerance as well as an Intersector before the AreaBuilder, if necessary.

If that doesn't work, consider posting a small ffs-file here with some sample data so that we can give a more tailored response.


Does this come from a CAD source? If you want the yellow lines you could perform a filter using the color attribute.

 

 


The result will depend on how accurately the lines are connecting, the should be 100% topologically correct for this to work. You may want to try a Snapper (segment snapping) with a small tolerance as well as an Intersector before the AreaBuilder, if necessary.

If that doesn't work, consider posting a small ffs-file here with some sample data so that we can give a more tailored response.

Lines are snapped I tried adding Snapper with small tolerance and all the lines outputs as Untouched. I will upload some data. testdata.zip

 

 


Does this come from a CAD source? If you want the yellow lines you could perform a filter using the color attribute.

 

 

Unfortunately all the lines are the same color. I changed it to showcase what I need because English is not my native language and sometimes people doesn't understand me at first. Thank you for your input @oscard

 


Seems to work fine for me:

Input:

Output:

Here's the workspace (FME 2017.1.2.1):

getperimeter.fmwt


Seems to work fine for me:

Input:

Output:

Here's the workspace (FME 2017.1.2.1):

getperimeter.fmwt

I get that too but it is only one line or polygon for me. I need to get lines that make that polygon.

 

 

 

 

In table view i need to get 100+ rows that represent lines. With this I only have one.

Thanks for the feedback, didn't realize you needed to preserve the input lines. Try this:

getperimeter.fmwt


Thanks for the feedback, didn't realize you needed to preserve the input lines. Try this:

getperimeter.fmwt

This is the one. Thank you @david_r and sorry for misunderstanding.

 


Thanks for the feedback, didn't realize you needed to preserve the input lines. Try this:

getperimeter.fmwt

The SpatialFilter can also be used instead of the LineOnLineOverlayer + Tester.

 

  • GeometyCorecer -> Filter
  • Original Line Features -> Candidate
  • Spatial Predicates to Test: "Filter Contains Candidate"

 

Another approach.

 

 

 


Hi @luckym You could also use just a TopologyBuilder after the AreaBuilder. The Universe feature will be a polygon of the outer edges.


Hi @luckym You could also use just a TopologyBuilder after the AreaBuilder. The Universe feature will be a polygon of the outer edges.

Yes it gave the largest polygon but in my case i needed the lines that make that polygon. Accepted answer gave mi that. Thank you for your input @DanAtSafe it may help someone in the future.

 


The SpatialFilter can also be used instead of the LineOnLineOverlayer + Tester.

 

  • GeometyCorecer -> Filter
  • Original Line Features -> Candidate
  • Spatial Predicates to Test: "Filter Contains Candidate"

 

Another approach.

 

 

 

Yes, this is another approach. Thank you @takashi.

 


Reply