Skip to main content
Question

How do you create geometry from an array of coordinates?

  • November 15, 2022
  • 2 replies
  • 175 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
  • 8391 replies
  • 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
  • 44 replies
  • 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.