FME 2020: “AreaBuilder” tool fails to convert lines to polygons,
I couldn’t figure out why AreaBuilder” tool fails to convert lines to polygons
The data and workbench are attached
FME 2020: “AreaBuilder” tool fails to convert lines to polygons,
I couldn’t figure out why AreaBuilder” tool fails to convert lines to polygons
The data and workbench are attached
Hi @jamal,
From all your questions, it seems you're having quite a few difficulties with your workflow.
To create the block polygons from the linework supplied we need to extend the lines to ensure we have closed geometries.
First, filter the features into Ellipses and Lines (GeometryFilter) to separate circles and lines.
Next, reduce the circles to their centre points (CenterPointReplacer)
Then, with an AnchoredSnapper using the points as anchors snap the lines to the points, using a tolerance of the circle radius — in this case I've used 1.55m (r = 1.5m) <edit> I note that your circles are actually r = 0.75m, so you can reduce the AnchoredSnapper tolerence to 0.8m
Finally build the polygons from the Snapped and Untouched ports (AreaBuilder)
I hope that gets you going with your workflow
Thank you tomf
As raw CAD data comes with circles, lines, and text out of which parcels are assumed to be derived, the following approach is followed
- All lines inside circles are erased (to clean them)
- Lines are extended by 1.5 (I assume that lines will extend from each end by 0.75)
- Lines are converted to polygons
- Texts are transferred to polygons
The lines fail to be converted to poygon!
Are the circle centre points the same as the polygon corner vertices? If this is correct then the approach in my previous reply will give you the polygons. as required. All you need to do the is for the Unfiltered features from the GeometryFilter, use an AttributeExposer to expose autocad_text_string and then use a PointOnAreaOverlayer to transfer the attribute onto the polygons.
Using your methodology, looking at the Help for the LineExtender, the Stretched port extends the line at both ends by the Extension Length, i.e., 1.5m each end. To assist with Area building after extending the lines, it would be worth pushing them through an Intersector. Then, at least, lines are broken where they intersect ready for area building (This also removes the need to drop lines segments inside the circles).
If the lines don't intersect where expected (irregular or not closed geometries produced) and the circle centre points are not the polygon corners, we are going to need to understand how a polygon corner vertex is meant to be defined in the CAD file.
Thank you tomf for the help.
As the CAD data is really dirty, I think I still need more tools to clean it to get the expected result
Sample real data is attached but the workbench is not sufficient to extract the parcel correctly due to the extremely dirty way the CAD is drawn.
Having looked at your "real" data I'd have to agree — I'd also say the CAD data is notoriously difficult to deal with due to the many different ways the same objects can be drawn in CAD. Two main issues with the data as I see it:
To help you on your way with this, as this is turning into a significant piece of work, I would be trying to achieve the following:
To solve this, without getting the CAD redrawn, the arcs and lines that touch these Parcel circles and which end of the feature is touching, start, end or both, need to be identified (SpatialRelator, or an Overlayer).
For straight lines the LineExtender can be used to extend the line at the appropriate end (Need to test the LineExtender output to ignore the incorrectly extended lines, i.e., ignore the feature exiting Beginning if it should be End, and accept it passing through End.)
Have a go at this, and then come back to us with some more specific questions. Good Luck!
With Arcs there is a lot more work to be done to redefine the arc, with its new start/end point(s), but keeping the same primary and secondary axes, and centre point. I'd be looking at the ArcPropertyExtractor, ExpressionEvaluators to recalculate sweep angles, start angles, and 2DArcReplacer to recreate the complete, original arc geometry, but this list is not exhaustive for this workflow!
I figure out that I need to work with FME and AutoCAD simultaneously. There is no way to avoid working in AutoCAD to fix some critical drawing issues.
- I first run the workbench and find out parcels that fails to convert to polygons. These parcels can be identified by displaying parcel numbers that are left outside polygons. Then I go to AutoCAD and fix these parcels
- Then parcels that have more than one number are identified. Then I go back to AutoCAD and fix them
For example, out of 35 parcels, 10 have issues that need to be fixed at the level of AutoCAD! I can live with this at the moment till smart or better approach can be reached out.
Hi @jamal,
With a pure FME approach I've got this far with your parcels:We're not going to get 21, 41, 42, 36, 49, and 45 by the current method, but FME will still be able to take us closer. Parcels 106, 34 and 38 all have at least one short line whose short end should be defined by a circle that is missing. If these last vertices were circled, this process would create and number these three parcels too.
A further issue we have in the CAD is the lines and arcs defining, what I assume is, the road on the West side of the site. Around parcels 37, 33, 54, 27, there are two boundary definitions with varying start and end points and different arc parameters. One would be the parcel and the other the road. Either they should be defined identically or road lines should be held on a different CAD layer to parcel lines. As a result we're creating a few small polygons that we shouldn't. Further cleaning before polygon building will help here.
The road in the middle going to the East of the site is a closed polygon and shared single linework with the surrounding parcels. Without the line at the end of the road no polygon would be created.
Attached is the workspace so far.
Thank you tomf for the prompt help.
There is a good match between the result of the workbench you have developed and mine (attached) before touching the CAD file despite the fact that I never implemented any tool to clean the arc.