Skip to main content

Hi there!

I want to create polygons from an attribute that contains a string of coordinates and other information. 

My problem is that I don't know how to only extract the coordinates from the string and then create the polygons by their ID attribute. 

 

The string in the coordinates attribute looks like this:

“{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":nat13.707920553133594,60.03475791657763],513.708950521395312,60.03304306231432],313.705474378512012,60.03160680337132],313.702513219759567,60.02997753853561],513.702255727694139,60.030577803349054],413.703929426119434,60.03184261136259],313.706161024019824,60.032571461785544],813.707920553133594,60.03475791657763]]]}}”

 

ID attribute 1 to 10

 

Regards, 

 

Ricardo :) 

You can create a geometry from this using the GeometryReplacer. Set it to Esri JSON. If that does not work you might need to extract the geometry part using the JSONExtractor. If you want me to create a sample workspace, you’ll need to attach complete source file.


Thank you @nielsgerrits !!!

Here is the file. 


Thank you @nielsgerrits !!!

Here is the file. 

Workspace sample attached.

 


Thank you @nielsgerrits 😃👍🏽😄


Hi @nielsgerrits 

why did you use the FeatureReader instead of the Excel-Reader? What are the benefits of your solution?

 

Greets 

Tom


Hi @nielsgerrits 

why did you use the FeatureReader instead of the Excel-Reader? What are the benefits of your solution?

 

Greets 

Tom

Hej Tom, this is personal preference. When the FeatureReader and FeatureWriter were introduced (in 2016?) I stopped using the classic Readers and Writers. I find them more intuitive to configure. All our teammembers use FME this way.


Reply