Skip to main content
Solved

Converting numbers to geometry

  • June 4, 2021
  • 2 replies
  • 42 views

larue
Contributor
Forum|alt.badge.img+12

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

debbiatsafe
Safer
Forum|alt.badge.img+21
  • 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
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • 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.

Nice job @debbiatsafe​