Skip to main content

Hi There, I have a set of points that make up an area of interest. I am trying to create a polygon using the points, using Linebuilder & LineCloser. It does create the polygon but it's not what I was expecting. I am looking for some feedback on how to resolve this. Thanks Jay

I would create the polygon using a HullAccumulator


Or if they are all rectangles, the BoundingBoxAcculmulator is also an option. Use the Group by option to create rectangles per grouping attribute.


I would create the polygon using a HullAccumulator

Thanks Erik for your quick feedback. Using HullAccumulator with Concave option, I get this. It's better than what i had before, tried few alpha values but still not getting clean edge.

With Bounding Box Accumulator, it creates a bounding box that covers all the polygons, this wotn work in this case.

Thanks


The important thing to note about the LineBuilder is that it'll construct the line in the exact order that it receives the points. For this reason, you'll probably want to use something like a Sorter before the LineBuilder to make sure your point features are in the order that you want your polygon vertices.


Or if they are all rectangles, the BoundingBoxAcculmulator is also an option. Use the Group by option to create rectangles per grouping attribute.

Thanks for the note. I tried BoundingBoxAccumulator and this is what I get, it's giving me some extra area in SW corner, where there are no points. Jay

 

 

 

 


Thanks for the note. I tried BoundingBoxAccumulator and this is what I get, it's giving me some extra area in SW corner, where there are no points. Jay

 

 

 

 

Do the points that should form a polygon have a defining attribute to group by?

 

Because grouping should get you the 4 areas and not one single area for all points.

 

 


Or if they are all rectangles, the BoundingBoxAcculmulator is also an option. Use the Group by option to create rectangles per grouping attribute.

I am using group by option. Thanks

 

 


I am using group by option. Thanks

 

 

I have created an example showing what I mean.

 

It is creating a set of points (I tried to place them in the workspace at the location the points are created) and then generates the polygons.

 

Hope this helps.bbox-example.fmw

 

 


Or if they are all rectangles, the BoundingBoxAcculmulator is also an option. Use the Group by option to create rectangles per grouping attribute.

Thanks Eric for the example workspace. This workspace creates the output correctly. I noticed that your group by fields are different (ID; 1,2,3). In my case, I have the same id for all the points. This is why I am not getting the result that i am expecting because Bounding Box Accumulator expects the values to be different. Some additional background, I started from three different polygons with same attribute, extracted all the vertices and then I want to create a polygon that combines all the points. The way I interpreted that group by would combine all the points with the same attribute into one geometry but this is not the case here.

 

 


Thanks Eric for the example workspace. This workspace creates the output correctly. I noticed that your group by fields are different (ID; 1,2,3). In my case, I have the same id for all the points. This is why I am not getting the result that i am expecting because Bounding Box Accumulator expects the values to be different. Some additional background, I started from three different polygons with same attribute, extracted all the vertices and then I want to create a polygon that combines all the points. The way I interpreted that group by would combine all the points with the same attribute into one geometry but this is not the case here.

 

 

The Group By groups all features with same value for the selected attribute.

 

Before creating the vertices from the original polygons, you could add a dummy attribute by using a Counter transformer and the use that to Group by.

 

Hope this will give you ideas how to move forward.

 

 


Or if they are all rectangles, the BoundingBoxAcculmulator is also an option. Use the Group by option to create rectangles per grouping attribute.

Thanks, I will try to get data prepared for this and see how that goes. Appreciate your help. Jay

 


Thanks Eric for the example workspace. This workspace creates the output correctly. I noticed that your group by fields are different (ID; 1,2,3). In my case, I have the same id for all the points. This is why I am not getting the result that i am expecting because Bounding Box Accumulator expects the values to be different. Some additional background, I started from three different polygons with same attribute, extracted all the vertices and then I want to create a polygon that combines all the points. The way I interpreted that group by would combine all the points with the same attribute into one geometry but this is not the case here.

 

 

I'm just curious. Since you started from three different polygons, you must have the polygons originally. Then, why do you need to recreate the polygons from the points?

 


Thanks Eric for the example workspace. This workspace creates the output correctly. I noticed that your group by fields are different (ID; 1,2,3). In my case, I have the same id for all the points. This is why I am not getting the result that i am expecting because Bounding Box Accumulator expects the values to be different. Some additional background, I started from three different polygons with same attribute, extracted all the vertices and then I want to create a polygon that combines all the points. The way I interpreted that group by would combine all the points with the same attribute into one geometry but this is not the case here.

 

 

Perhaps are you going to resolve small gaps between the original rectangular polygons and merge them to form a single polygon? If so, a combination of the Snapper (Snapping Type: Segment Snapping) and the Dissolver could be an easier workaround, rather than building an area from points.

 


Or if they are all rectangles, the BoundingBoxAcculmulator is also an option. Use the Group by option to create rectangles per grouping attribute.

Hello Takashi, Thanks for your input. You are right, I am
starting with polygons and then trying to merge these to create a combined
geometry that is made up of all the polygons. Our existing workspace does use
snapping/dissolving to do this. It works fine mostly but we came across an
issue where workspace misses some of the polygons. The odd thing about this is
that if I run FME process with smaller dataset it works fine but when running
with full dataset, it misses polygons. I have an active case with FME support
on this issue and have provided them with recordings.

 


 


In the meantime, I am looking to find alternative approaches for solving this
problem. I converted polygon vertices to points and then hoping to build
polygon from there. I came across HullAccumlator transformer that seemed
promising but transformer all points to be in sequence to work properly, which
isn’t the case as each individual polygon has its own orientation. This is what
I get.

 

 

 

I am trying to see if Bounding Box Accumulator can provide what I am looking for.

 

Thanks

 

 

 

 


Hello Takashi, Thanks for your input. You are right, I am
starting with polygons and then trying to merge these to create a combined
geometry that is made up of all the polygons. Our existing workspace does use
snapping/dissolving to do this. It works fine mostly but we came across an
issue where workspace misses some of the polygons. The odd thing about this is
that if I run FME process with smaller dataset it works fine but when running
with full dataset, it misses polygons. I have an active case with FME support
on this issue and have provided them with recordings.

 


 


In the meantime, I am looking to find alternative approaches for solving this
problem. I converted polygon vertices to points and then hoping to build
polygon from there. I came across HullAccumlator transformer that seemed
promising but transformer all points to be in sequence to work properly, which
isn’t the case as each individual polygon has its own orientation. This is what
I get.

 

 

 

I am trying to see if Bounding Box Accumulator can provide what I am looking for.

 

Thanks

 

 

 

 

I've understood the situation, but I think it could be quicker to investigate the reason that some polygons have been missing when you applied Snapper + Dissolver and think of a way to avoid that. Can you share a minimal dataset containing polygons that reproduce the symptom (i.e. some polygons would be missing after applying Snapper and Dissolver)?

 


Hi,

Is it possible to post the data to give a try...


Hi,

I assumed input is polygon. You are converting polygon to point and joining all the points back to become polygon. So I have prepared the workbench based on this logic. Hope this helps...

none2none.fmw


This workflow could also be a workaround in the interim. Assume the input geometries are rectangle polygons adjacent together and there could be a small gap between them.


Hi,

Is it possible to post the data to give a try...

Thanks Pratap, Here is the actual data set for my testcase. Jay

 

test.zip

 

 

 


Hi,

I assumed input is polygon. You are converting polygon to point and joining all the points back to become polygon. So I have prepared the workbench based on this logic. Hope this helps...

none2none.fmw

Thanks Pratap for sharing this, I did try and replace the input from my test case in this workspace, it does create polygons but still keeps inside polygons boundaries. Jay

 


This workflow could also be a workaround in the interim. Assume the input geometries are rectangle polygons adjacent together and there could be a small gap between them.

The right orange shape is a single polygon which is created from your sample data with the workflow above. Is this your desired result?

 

result 

 


This workflow could also be a workaround in the interim. Assume the input geometries are rectangle polygons adjacent together and there could be a small gap between them.

Hi Takashi, This is exactly what I am looking for. Do you mind sharing this workspace? I would like to try few other cases. I really appreciate your input on this. Thanks Jay

 

 


Hi Takashi, This is exactly what I am looking for. Do you mind sharing this workspace? I would like to try few other cases. I really appreciate your input on this. Thanks Jay

 

 

This is it: dissolve-disjoint-rectangle-polygons.fmwt (FME 2017.0)

 

 


Thanks Pratap for sharing this, I did try and replace the input from my test case in this workspace, it does create polygons but still keeps inside polygons boundaries. Jay

 

I have removed the creators and added the input data you have provided. I have attached the results to this thread. I did not find any contradictions.

 

 

 

What do you mean by "but still keeps inside polygons boundaries"???

 

 


This workflow could also be a workaround in the interim. Assume the input geometries are rectangle polygons adjacent together and there could be a small gap between them.

Thanks Takashi, The result from this workspace are very promising, I am still in process of checking few more cases that are complex /disjointed geometries. Thanks for your help on this. Jay

 

 


Reply