Skip to main content

I'm very new to FME and sorry if my question is stupid.

There are some JSON data containing objects with multipolygon geometry on a single spline 256x256 with integer values of (x, y) as you can see in following example (just part of whole file of course)

{"HotspotMetaData":{"id":162011,"RenderedGeometry":{"type":"MultiPolygon","coordinates":[[[[0,231],[-3,228],[-9,233],[-6,236],[0,231]]],[[[1,227],[-1,225],[-6,231],[-3,234],[1,227]]],[[[3,224],[0,222],[-3,228],[0,230],[3,224]]],[[[8,229],[9,225],[0,222],[-1,226],[8,229]]]]}},"hintContent":"40 km/h","unit":"kilometers per hour","description":40}

See on JsonEditorOnline

As I can see it is very similary to GeoJSON except that "Rendered ...", but!

First of all FME say me "There is no geometry". Ok, I can live without it. But I see no way how to access that multi-array of coordinates. I got all of that "HotspotMetaData.Id", "RenderGeometry.type" and all that "unit", "description" etc. But not that most necessary geometry. How can I get that and convert to MID / MIF or any other format, even if it is "Excell" with rows of something like this:

id

value

polygonxy16201140 km/h0023116201140 km/h0-3228....16201140 km/h1122716201140 km/h1-1225....

Any help will be appreciated!

Extract the rendered geometry to an attribute, JSONExtractor: json["HotspotMetaData"]["RenderedGeometry"]

follow that by a GeometryReplacer with the geometry encoding as GeoJSON and the geometry source the attribute you created in the previous step.


Extract the rendered geometry to an attribute, JSONExtractor: json["HotspotMetaData"]["RenderedGeometry"]

follow that by a GeometryReplacer with the geometry encoding as GeoJSON and the geometry source the attribute you created in the previous step.

thanks alot! Working fine and w/o any additional question, you are great :)


Extract the rendered geometry to an attribute, JSONExtractor: json["HotspotMetaData"]["RenderedGeometry"]

follow that by a GeometryReplacer with the geometry encoding as GeoJSON and the geometry source the attribute you created in the previous step.

Wow - my meticulous and determined chain of Transformers replaced by just two! Thank you.


Reply