Skip to main content
Solved

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


larue
Contributor
Forum|alt.badge.img+8
  • Contributor

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

Best answer by takashi

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

View original
Did this help you find an answer to your question?

7 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • April 4, 2021

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.


takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • April 5, 2021

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


larue
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • April 5, 2021
takashi wrote:

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!


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • April 5, 2021
larue wrote:

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

 


larue
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • April 5, 2021
larue wrote:

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​ 


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • April 5, 2021
larue wrote:

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.


larue
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • April 6, 2021
larue wrote:

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings