Question

How do you create geometry from an array of coordinates?

  • 15 November 2022
  • 2 replies
  • 9 views

Badge +3

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

Userlevel 4

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

Badge +3

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.

 

 

 

Reply