Skip to main content
Question

unable to create geometry from JSON

  • April 23, 2021
  • 2 replies
  • 128 views

amolparande
Forum|alt.badge.img+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

nampreetatsafe
Safer
Forum|alt.badge.img+13

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!


amolparande
Forum|alt.badge.img+1
  • Author
  • April 24, 2021

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