Skip to main content

Hello,

I'm very new to FME and trying a relatively simple workflow. I have a DWG file of a building layout. It includes polylines for rooms (all on one layer), and within each polyline, there is a simple text label for the room number (all on another layer).

 

I would like to transform the data in this DWG to an existing PostGIS table, where the room geometries will populate the 'geom' field and the text labels will populate the 'name' field.

 

I'm having a hard time converting the labels to text strings and also ensuring that the text labels are matched to the correct room polyline.

 

My current workflow is shown below:

The room polygons from the DWG file import fine, however the text labels for rooms do not populate at all in the PostGIS table.

You're so close! There are a couple of thing which need addressing here though:

 

 

1. what I can see here is that you are writing duplicate features into the database - You should use the NeighborFinder after the GoemetryValidator rather than on a separate flow. What you need is the Geometries/Polygons with the attributes.

2. The TextAdder here is not needed in this case. The text added actually creates a 'text' geometry features which you already have coming out of the 'name' layer.

3. In the NeighborFinder be sure that you are using the Attribute Accumulation is set to 'Merge Attributes' this will pass the 'autocad_text_string' onto the closest 'geom' feature.

 

 

4. You need to make sure that the attribute names match the names of the columns in the table. Use an AttributeManager to rename 'autocad_text_string' to 'name' the attrbute port should then turn green. Right now they are all red which means that FME will not write any data into those columns.

 

 

Best of luck!

You're so close! There are a couple of thing which need addressing here though:

 

 

1. what I can see here is that you are writing duplicate features into the database - You should use the NeighborFinder after the GoemetryValidator rather than on a separate flow. What you need is the Geometries/Polygons with the attributes.

2. The TextAdder here is not needed in this case. The text added actually creates a 'text' geometry features which you already have coming out of the 'name' layer.

3. In the NeighborFinder be sure that you are using the Attribute Accumulation is set to 'Merge Attributes' this will pass the 'autocad_text_string' onto the closest 'geom' feature.

 

 

4. You need to make sure that the attribute names match the names of the columns in the table. Use an AttributeManager to rename 'autocad_text_string' to 'name' the attrbute port should then turn green. Right now they are all red which means that FME will not write any data into those columns.

 

 

Best of luck!

That did the trick, thanks @virtualcitymatt!


Reply