Skip to main content
Solved

Converting numbers to geometry


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

I have a data set with numbers in x y z sequence separated by "," representing 3D geometry polygons and points. It was originally WKT and had been formatted to work with Dynamo (Revit).

 

Here is a sample of a point:

841.99951171875 678.6250000000001 -132

 

Here is a sample of a polygon:

409.000000000001 473.499999999999 372,409.000000000001 797 372,487 797 372,487 871 372,1275 871 372,1275 476.286679607417 372,1275 461.500000000111 372,409.000000000001 461.5 372,409.000000000001 473.499999999999 372

 

My hunch is to chop everything up into x y z attributes and then reconstitute into points/polygons. Using two AttributeSplitters, I can create a list, but then, how do you assign these numbers to x y z in sequence? It is so close to WKT, maybe there is an easier way?

 

Thanks,

@larue​ 

 

 

Best answer by debbiatsafe

Hi @larue​ 

You could try using an AttributeCreator or AttributeManager to format your data as WKT and then use a GeometryReplacer.

 

For example, with the point data, insert POINT ( in front of the data and ) after to create

POINT (841.99951171875 678.6250000000001 -132)

 

This value can then be used in the GeometryReplacer with the geometry encoding as OGC Well Known Text.

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

2 replies

debbiatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • Best Answer
  • June 5, 2021

Hi @larue​ 

You could try using an AttributeCreator or AttributeManager to format your data as WKT and then use a GeometryReplacer.

 

For example, with the point data, insert POINT ( in front of the data and ) after to create

POINT (841.99951171875 678.6250000000001 -132)

 

This value can then be used in the GeometryReplacer with the geometry encoding as OGC Well Known Text.


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • June 5, 2021
debbiatsafe wrote:

Hi @larue​ 

You could try using an AttributeCreator or AttributeManager to format your data as WKT and then use a GeometryReplacer.

 

For example, with the point data, insert POINT ( in front of the data and ) after to create

POINT (841.99951171875 678.6250000000001 -132)

 

This value can then be used in the GeometryReplacer with the geometry encoding as OGC Well Known Text.

Nice job @debbiatsafe​ 


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