Solved

how to create multiple geometries fron one json file

  • 21 March 2018
  • 4 replies
  • 5 views

Badge +3

Hi Team,

In my case, there are multiple geometries coordinates in one json file. I need to create multiple geometries and write to shp file. Sample json file attached.

in this file there are multiple geometry blocks, I should iterate thru json and create geometris.

help will be appreciated

icon

Best answer by takashi 21 March 2018, 16:28

View original

4 replies

Badge +3

I created an FME workspace that reads your file. See attachment.

 

I read the text-file with a Text File Reader and the parameter 'Read Whole File at Once' set to 'Yes'. Next I used a JSONFragmenter to get the separate features. Finally I used a GeometryReplacer to create the geometries.

I created the workspace with the version 2017.1.2.1

read-geojson.fmw

Userlevel 2
Badge +17

Hi @fkemminje, the "JSONResult" object in the document is basically conforming to GeoJSON feature collection format, but each feature object doesn't have "type" member (value is "Feature") unfortunately.

If you insert "type" member to every feature, you can ten convert them to individual features having geometry and attributes with the JSONFragmenter.

Badge +3

@takashi

@lars_de_vries

thank you

Badge +3

@takashi

@lars_de_vries

thank you

you're welcome!

 

 

Reply