I am using FME to transform a dwg file into a polygon shapefile (.shp).

The dwg file is an urban plan of a city consisting of building blocks (type: polylines) and the properties within each block (type : line).

I used the GeometryCoercer transformer to convert type:line to type:polygon but it does not seem to work. I have also tried AreaBuilder, no success.

For those familiar with the FME software can you suggest Any solutions?


I attach an image of the dwg file (INPUT) enter image description here

green closed polylines represent building blocks orange lines represent properties

I used the workspace as provided by @Mapperz, but it didnt work out. I set the geometry coercer type : fme_line , then 2dForcer and AREA BUILDER writing to a .shp with attributed geometry shape_polygon. This is what I get.

enter image description here

When I set the output .shp geometry to shape_polyline I get the following enter image description here

I need a shapefile where all buildings and all properties will have a polygon geometry in order to add attributes to each polygon.

  • 1
    Would it be possible for you to post a small sample area of your data?
    – blah238
    Sep 26, 2012 at 16:59
  • 1
    From the screenshots I think you need to make your purple polygons into lines then use the feature merger to have all your lines together - then build polygons - they are currently separate layers. docs.safe.com/fme/html/FME_Transformers/…
    – Mapperz
    Sep 27, 2012 at 13:38

2 Answers 2


Using FME 2013 beta here

read the CAD [DXF] control the geometry - GeometryCoercer (FMEline) control the geometry - Force 2D (2d line only)

Build the Polygons

Output port AREA

Write Shapefile

See Image - as proof of concept.

enter image description here


with autocad map this can be accomplished fairly easily.
Perhaps the first thing you should do is to close the polylines that may give you a better polygon result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.