Question

Polyline to polygon


Badge +2

I am struggling to convert a polyline ( 2d & 3d ) to Esri feature class. I have used a geometry filter + Elevation Extractor + 2d Forcer + Area Builder. However half of the result of Area Builder transformer appears to be incomplete. Any idea as to how to convert all the polylines in to a polygon successfully....?  

 

Thank you


10 replies

Badge +2

Workspace Screenshotthis is the method I have used....

Badge +2

@gistech_​  areas have to close. Also try Snapper to make sure all the line touch.

If that doesn't work perhaps attach a small sample dataset

Badge +2

I have set the parameter for Snapping inside AreaBuilder. Please see the screenshot

 

image

Userlevel 4
Badge +25

Could you try the LineCloser transformer? If that works it suggests that the gap is perhaps larger than the tolerance you have set. Otherwise - as @Mark Stoakes​ suggested - perhaps you could post a small sample dataset? It's very hard to diagnose the problem without seeing the data involved.

 

Oh, I noticed you have Aggregate Handling set to Deaggregate. It's just a thought, but maybe the 2DForcer isn't flattening features that are an aggregate? So add a Deaggregator after the GeometryFilter to make sure that happens. Unlikely, but without seeing the data it's something that might be happening.

Badge +2

attached is the sample data. please let me know if you require more info.

 

Thank you!

Badge +2

@gistech_​ thanks for including the sample data. I ran one of the file through AreaBuilder with Snapping Pre-Processing > Vertex Snaping & Snapping tolerance 0.001 and the areas seemed to come out OK (FME 2022.2) I think just a little experimentation with those parameters should get you on a path to success.

image

Badge +2

Thank you @Mark Stoakes​ 

 

I should have explained this from the beginning but here is the thing....

 

The autocad files are generated from an aerial imagery and those cad files have a layer that represents different features in the ground. The 11 Autocad files attached are sample(Have more than 11). For this exercise, I am looking to extract the "Lake" layer and have it as complete esri polygon. Each attached files covers 1km by 1km area and would have to read them all at once to get the complete shape of the lake as shown below.

 

also attached the workspace I have used.

 

The goal is to get the lake as a complete polygon esri feature class after reading all the cad files because a single CAD file doesn't cover the entirety of the lake. And need to do the same for "Swamp Outline" layer as well.

 

Incase if you wonder the cord sys CSRS UTM 17

imageThanks again!

 

 

 

Badge +2

@gistech_​ Can you use the Select Multiple Folders/Files too to read the DWG tile files?

Badge +2

yes, and thats how I read the input CAD files. However couldn't get the result as a polygon feature. Please take a look on the sample FME workspace template shared in my Nov 25th reply. "KallyLakeSample"

 

Badge +2

@gistech_​  There's a gap of about 6m between the ends of the lines on the large lake - which is the one that isn't closing:

imageHere are the coordinates of the ends of two two of the lines:

496136.52640000003, 5143754.597200001, 247.01679999998305

496128.6581381634, 5143754.445327409, 0

 

So you probably need to do some Snapping. I Tried Snapper with Snapping Distance = 10 and End Point Snapping. I think you get the same result if you increase the Snapping Tolerance in AreaBuilder

Reply