Solved

Can GeometryReplacer handle two attributes, or... what is the proper way to encode multiple attributes without creating duplicate features?


Badge +5

Hello,

I have an Excel file with WKT format geometry in two separate columns (attributes, correct?) that I am struggling to encode without creating duplicate rows (features) or overwriting one or the other. Using GeometryReplacer, I can replace the geometry separately, but if I chain them together, only the last one is shown as it goes into 3D Coercer. If the GRs are in parallel, they create duplicate rows. It is important to keep the row structure intact.

 

DupeFlow1Above, the Boundaries and Rep. Points transformers are the GeometryReplacers. Obviously, this is no good, but it is the only way I can see both attribute geometries. This what I want (but without the dupes):

DupeFlow2Ideally, it would be something like this, but it doesn't work:

DupeFlow3Per the "Go with the Flow" article, if the Workspace takes each feature(row) through the process before moving on, why does GeometryReplacer negate the first GR (Boundaries) and just encode the last (Rep. Points), even though the source attributes are different?

 

Alternatively, is there a way to encode both attributes in a single GR? You would think there is a TCL string syntax that could do that, but I haven't found it.

 

Any info is appreciated!

Thanks

icon

Best answer by takashi 5 April 2021, 02:39

View original

7 replies

Userlevel 2
Badge +17

Hi @larue​ ,

If the input feature has a geometry already, the GeometryReplacer overwrites it by newly created geometry, so the two GeometryReplacers connected in a series (shown in your second screenshot) won't bring your desired result.

I don't think there is a way to create a multiple geometries from two attributes simultaneously with a single GeometryReplacer.

If your goal is to create features each of which will have a geometry collection consisting of a boundary and a point, the Aggregator (setting a row identifier to the Group By parameter) might help you. See the screenshot below to learn more.

 

geometryreplacers-aggregator 

If you exposed xlsx_row_id in the Excel reader feature type, you can use it as row identifier (Group By) and omit the Counter shown.

Userlevel 2
Badge +17

Found another way.

Since the geometry format is OGC WKT, a single GeometryReplacer with this setting could work as well. Assuming that "boundary" attribute stores WKT POLYGON text and "point" attribute stores WKT POINT text.

geometryreplacer-parameters

Badge +5

Found another way.

Since the geometry format is OGC WKT, a single GeometryReplacer with this setting could work as well. Assuming that "boundary" attribute stores WKT POLYGON text and "point" attribute stores WKT POINT text.

geometryreplacer-parameters

Excellent! The string is exactly what I was missing. I'm a week into working with FME and it's been fun. The end goal is to process spatial data into an automated Revit model creation workflow using Dynamo, which is a natural choice. Good stuff. Thanks a bunch!

Userlevel 2
Badge +17

Excellent! The string is exactly what I was missing. I'm a week into working with FME and it's been fun. The end goal is to process spatial data into an automated Revit model creation workflow using Dynamo, which is a natural choice. Good stuff. Thanks a bunch!

Hi @larue​ ,

If you are interested in integrating FME into a Dynamo process, you may wish to have a look at the following article: Integrating FME into Dynamo for Revit

 

Badge +5

Excellent! The string is exactly what I was missing. I'm a week into working with FME and it's been fun. The end goal is to process spatial data into an automated Revit model creation workflow using Dynamo, which is a natural choice. Good stuff. Thanks a bunch!

Hi @daveatsafe​ ,

I checked out that article but could not find the FMEPCConfg.exe utility on my machine. I am demoing the Workbench only. Maybe I need the full version?

At any rate, will definitely give it a go once I have a handle on FME. It's so vast!

Really appreciate all the documentation and community help, and looking forward to creating some cool stuff.

 

Best,

@larue​ 

Userlevel 2
Badge +17

Excellent! The string is exactly what I was missing. I'm a week into working with FME and it's been fun. The end goal is to process spatial data into an automated Revit model creation workflow using Dynamo, which is a natural choice. Good stuff. Thanks a bunch!

Hi @larue​ ,

Yes, I think it was optimized out of our latest install packages 😞

Please try installing FME 2019.2 from https://www.safe.com/support/downloads/#past-versions.

I've been meaning to switch from Python to C# nodes, and see if I can build a proper interface for Dynamo.

Badge +5

Excellent! The string is exactly what I was missing. I'm a week into working with FME and it's been fun. The end goal is to process spatial data into an automated Revit model creation workflow using Dynamo, which is a natural choice. Good stuff. Thanks a bunch!

Zero touch or a C# package would be sweet. At the same time, I would be happy with a transformer/translation into DesignScript syntax. That would be a good exercise. Lots of possibilities!

Reply