Question

unable to create geometry from JSON

  • 23 April 2021
  • 2 replies
  • 19 views

Badge +1

Hello FME Users,

I have JSON file in it having Polygon and "coordinates"  I could not able to create geometry from it I tried to use JSONFragmenter and Fragment as formate = GeoJSON but could not had luck. Can any one help me to create Geometry I am also attaching JSON file for reference  


2 replies

Userlevel 1
Badge +10

Hi @amolparande​ ,

 

I took a stab at this and I think I managed to get a polygon feature using the JSON Reader.  There might be a better way to do this, but this seemed to work for me.  In the JSON Reader parameters, I used the following JSON Query for the Feature Type: 

json["messagePayload"]["areas"]["00005831-3100-1200-0000-00007d3134f3"]

I then set the "Geometry Name Key" to geometry.

I've attached the workspace with the Reader.  Hope this helps!

Badge +1

Hi @amolparande​ ,

 

I took a stab at this and I think I managed to get a polygon feature using the JSON Reader.  There might be a better way to do this, but this seemed to work for me.  In the JSON Reader parameters, I used the following JSON Query for the Feature Type: 

json["messagePayload"]["areas"]["00005831-3100-1200-0000-00007d3134f3"]

I then set the "Geometry Name Key" to geometry.

I've attached the workspace with the Reader.  Hope this helps!

@nampreetatsafe​ Thank you it's Working now 

Reply