Question

Polylines to polygons, preserve attributes?


Badge

I'm a new user to FME, trying to understand how to convert polylines to polygons while preserving attribution. The lines were originally created from a polygon feature class then manipulated and shifted in ArcGIS to reflect updated geometry. Arc has a known bug in it's Polyline to Polygon tool, and and will not preserve attributes as a result, so I'm trying to do the conversion back to polygons in FME.

(This is part of an overall process of attempting to match attributes from the old polygon dataset to a newer dataset with more correct geometry but inadequate attributes. There is no consistent unique identifier between the datasets so I have to match them spatially.)

So far I have tried the suggestions in the following forums but must be missing something as I still can't get the attributes to come through:

https://knowledge.safe.com/questions/2613/areabuilder-how-to-preserve-attributes.html

 

https://knowledge.safe.com/questions/3103/polylines-to-polygon-with-attributes.html

https://knowledge.safe.com/questions/4163/area-builder-transformer-removes-the-fieldsattribu.html

 

https://knowledge.safe.com/questions/4780/fme-feature-type-attributes-removed-after-areabuil.html

I am pretty familiar with Arc but less so with FME so it's possible I'm missing something really basic about how to set up a workspace or something.


10 replies

Userlevel 2
Badge +17

Hi @ldengler, in FME 2016.1+, the AreaBuilder preserves attributes of a representative line by default, and also it can generate a list which contains attributes of all lines optionally. See the "Attribute Accumulation" parameters group. Doesn't these functionality satisfy your requirement?

Badge

Hi @ldengler, in FME 2016.1+, the AreaBuilder preserves attributes of a representative line by default, and also it can generate a list which contains attributes of all lines optionally. See the "Attribute Accumulation" parameters group. Doesn't these functionality satisfy your requirement?

Hi @takashi, thanks for your reply. However I forgot to specify that I am using FME 2014, running off a Citrix Server so I do not have options to upgrade. So unfortunately I do need to find a way to manually preserve them.

Badge +16

the ability to generate a list, as mentioned by takashi is also possible in fme 2014.

Hope this helps

Badge

Hi @itay,

 

I could be missing something but I really don't understand about how to create the relevant list. These are the parameters I used for my last run. The polygons came through without attributes. I had also previously attempted giving the list an arbitrary name, as per suggestions in the above links.

 

I'm currently reading through the documentation on FME parameters, to try to figure out how to better define a list. Still don't entirely understand the lingo however, any further thoughts would be appreciated. Thanks!

Userlevel 2
Badge +17

You have set a user parameter to the list name parameter. If the parameter value is not set, naturally the list will not be created. Even if the parameter value has been set, it may not be reflected on the Workbench GUI.

Badge +16

Hi @ldengler,

Yes using a parameter might not work, you can simply type 'MyList' in the teansformer parameter.

Another thing to mention is that list elements are only visible in the feature information window of the data inspector and not in the table view.

Userlevel 4
Badge +25

This article - https://knowledge.safe.com/articles/33912/point-in-polygon-calculations-with-the-pointonarea.html - may help you understand lists a bit better. It's a point-in-polygon example where there can be multiple points per polygon.

Basically a list is an attribute with multiple values. Few formats will accept such a thing, so you need to do something with it. For example, use a ListConcatenator transformer to merge all the list values into a single attribute.

Hope this helps.

Badge

Thank you everyone for your suggestions! I got sidetracked with another project the last few days so have not had a chance to test them out yet. However it looks like I should be able to resolve this next week!

Badge

Reviving an old thread here, finally had a chance to pick this back up again!

Thanks to the above suggestions, I was able to get the attributes and geometry to come through to the FME Data Inspector. However, I am still having trouble getting the attributes to save in my output geodatabase. I can see the attributes in the Inspector, but the .gdb saves geometry only. I can preserve attributes if I manually save features from the Inspector, but this means I am saving 60+ features individually as individual feature classes then later merging them back together...

Is there some trick for saving feature classes from FME to Arc format?

Badge +16

Reviving an old thread here, finally had a chance to pick this back up again!

Thanks to the above suggestions, I was able to get the attributes and geometry to come through to the FME Data Inspector. However, I am still having trouble getting the attributes to save in my output geodatabase. I can see the attributes in the Inspector, but the .gdb saves geometry only. I can preserve attributes if I manually save features from the Inspector, but this means I am saving 60+ features individually as individual feature classes then later merging them back together...

Is there some trick for saving feature classes from FME to Arc format?

Have you defined any user attributes on the writer feature type?

Reply