AnsweredAssumed Answered

JSON string input coordinate pairs

Question asked by jamesfreddyc on Sep 14, 2015
Latest reply on Sep 14, 2015 by jamesfreddyc

I am unable to properly setup a Toolbox script with a single input parameter to parse a json string.  I will be receiving the JSON as:

 

 

 

{

  
"rings" :

    [

    
[[-117,34],[-116,34],[-117,33],[-117,34]],

    
[[-115,44],[-114,43],[-115,43],[-115,44]]

  
]

  },

  {

  
"rings" :

    [

    
[[32,17],[31,17],[30,17],[30,16],[32,17]]

  
]

  }

 

So far I have tried to setup the script/tool with a String parameter and attempted to pull in the coordinate pairs and create a polygon feature but it's treating the entire string as a single value and I'm not sure of the best way to parse it into float values.

 

Any input is appreciated

Outcomes