Skip to main content
Solved

Reading a segment of json that is geojson

  • March 10, 2020
  • 2 replies
  • 123 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • 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.