Skip to main content
Question

How do you create geometry from an array of coordinates?

  • November 15, 2022
  • 2 replies
  • 140 views

fme_hans
Contributor
Forum|alt.badge.img+5

Hi,

I have array with geometry type and coordinates. How can I easily make geometry out of it? I could make a wkt text with string replace but I suspect it could be easier.

 

The string with geometry type and coordinates is (shortened):

{"type":"MultiPolygon","coordinates":[[[[155469.406,463438.624],[155469.253,463444.217],[155467.196,463444.174],[155467.077,463444.172],[155462.4]4,408. [ 155469.406,463438.624]]]]}

 

 

2 replies

david_r
Celebrity
  • November 15, 2022

Looks like GeoJSON, so I would first try the GeometryReplacer set to parse it as such.


fme_hans
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • November 16, 2022

Hi,

 

It is indeed GeoJson. I had put a wrong attribute in the geometry replacer and that's why it didn't work. Now that I put the right attribute in the geometry replacer, geometry is created. Thanks.

 

 

 


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