Skip to main content

I have a HTTPCaller to access an API from the Dutch road service Melvin. It returns an attribute with the json including geometry (response_body - here renamed to ‘gegevens’). I am quite new to JSON.

In order to extract the features I use 2 JSONFragmenters: one for the attributes and one for the geometry. I've tried many other setups with JSONfragmenters,-flatteners,-extractors etc, but I can't seem to find an answer as to how to get geometry and attributes from a json nicely joined back together.

  1. Current setup below. First I extract the geometry from the attribute (gegevens) and then from the same attribute (as the resulting attribute gets changed, thus I created another with the same information named gegevens_basis) by the fragmenter for the attributes. However it multiplies the number of attributes (700+ to 500,000+).
  2. Another setup (also below) sent all geometry to rejected.
  3. I also tried to do it from the same attribute from a junction but then I cant join then as I cannot get the id when fragmenting the geojson. And extracting the attribute geometry with the rest of the attributes returns missing, so no luck there as well. 

I guess there is no method to extract the geometry and json at the same time? Any thoughts?

 

Tried a different setup using the same attribute, but it sends the attributes to rejected:

Structure:

 

Hi ​@ares ,

The structure seems to comply with GeoJSON format. Have you tried saving the response into a file and reading it with GeoJSON reader?


Thank you for your quick reply.

I just found out that shifting attributes to the first JSONfragmenter and then using the resulting 'gegevens’-field as imput for a geometryreplacer (using GeoJSON for geometry encoding) did the trick.

Below the setup (after the httpcaller).