Skip to main content
Solved

JSON Multipolygon extraction

  • June 12, 2020
  • 2 replies
  • 65 views

Forum|alt.badge.img

Hello,

 

I'm trying to extract a multipolygon from a JSON file with the model of this topic (https://knowledge.safe.com/questions/40791/json-multipolygon.html) but I don't achive to do it ...

It's my first time working with JSON

 

The multipolygon in the Json file is defined like this (I replace real value by x1 x2 etc in the exemple) :

{ "stages": { "filters.hexbin":{"boundary": "MULTIPOLYGON (((x1 y1,x2 y2,x3 y3,.... )))

I've try with : json["stages"]["filters.hexbin"]["boundary"] in JSONExtractor but it doesn't work , an I don't really know what I need to fill in "JSON Document" ...

Does anyone have any idea how to do it?

 

Regards

Best answer by takashi

Hi @arnaudfouch, looks like the MULTIPOLYGON text is an OGC WKT geometry representation. If so, you can convert the text to a geometry with the GeometryReplacer (Geometry Encoding: OGC Well Known Text).

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

takashi
Celebrity
  • Best Answer
  • June 13, 2020

Hi @arnaudfouch, looks like the MULTIPOLYGON text is an OGC WKT geometry representation. If so, you can convert the text to a geometry with the GeometryReplacer (Geometry Encoding: OGC Well Known Text).


Forum|alt.badge.img
  • Author
  • June 13, 2020

Hi @arnaudfouch, looks like the MULTIPOLYGON text is an OGC WKT geometry representation. If so, you can convert the text to a geometry with the GeometryReplacer (Geometry Encoding: OGC Well Known Text).

Great ! It works !

Thank you very much