Skip to main content
Solved

Joining geometry and attributes after JSONfragmenters


ares
Contributor
Forum|alt.badge.img+2
  • Contributor

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:

 

Best answer by takashi

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?

View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • May 28, 2025

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?


ares
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • May 28, 2025

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).

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings