Skip to main content
Solved

Reading a segment of json that is geojson


Forum|alt.badge.img

I have a json where part of the json is in geojson.

The "polygons" attribute is just pure geojson multipolygon.

I'd like to able to read all the json structure but leave the polygons structure as a string and convert that to spatial data.

I've tried jsonflattener and exploders + listconcatenator/featurereader with no luck.

I know I can do something with python, but would rather not.

I've attached a sample file if anyone would like to give it a try

Best answer by daveatsafe

Hi @peterkt,

One way would be to use a series of JSONFragmenters to break up and extract the attributes from each level while drilling down to the polygons level. A GeometryReplacer can be used to create the geometry from the GeoJSON.

readjson.fmw

View original
Did this help you find an answer to your question?

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • March 10, 2020

Hi @peterkt,

One way would be to use a series of JSONFragmenters to break up and extract the attributes from each level while drilling down to the polygons level. A GeometryReplacer can be used to create the geometry from the GeoJSON.

readjson.fmw


Forum|alt.badge.img
  • Author
  • March 11, 2020

Thank you @daveatsafe,

Thanks for your incredibly quick reply. Json often confuses me. It feels like it's own specialty.

Thanks again.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings