Hi - I’m trying to create polygon geometry from the GeoJSON in the attached file. This is a string attribute returned from an API.
I was thinking I could use a GeometryReplacer with the encoding set to GeoJSON. However when I do this the record is rejected with an ‘INVALID_PARAMETER_GEOMETRY_SOURCE’ message.
I have passed the GeoJSON attribute through a JSONValidator and this doesn’t flag up any issues.
Any suggestions for what I’m doing wrong, or alternative approaches would be very welcome.
Thanks in advance.
What version FME do you use? When I read it as text and use a GeometryReplacer in 2024.2 it just works?
Hi mattebridges,
I also have a example for you :)
Similar to what Niels is doing he was just a minute quicker….
Edit: apperantly Niels changed his awnser… but I still have a working example for you haha
Thanks so much
We’re on 2023.1 - so nothing ancient.
I’ll have a go with both suggestions now - really appreciate your help here :-)
Thanks again to
I was able to get this to work using serial JSONFragmenters. I’m not sure I understand why the second Fragmenter produces geometry but hey I’ll take it!
Best wishes.
Hi
We’re on 2023.1 - so nothing ancient.
Originally GeometryReplacer (Geometry Encoding: GeoJSON) only supports replacing a “geometry” object with a geometry, not support replacing full GeoJSON document.
However, GeometryReplacer in FME 2024.2 or heigher supports replacing full GeoJSON document. You can find when the enhancement has been introduced in the Change Log, linked from the FME Downloads page.

Hi
We’re on 2023.1 - so nothing ancient.
Originally GeometryReplacer (Geometry Encoding: GeoJSON) only supports replacing a “geometry” object with a geometry, not support replacing full GeoJSON document.
However, GeometryReplacer in FME 2024.2 or heigher supports replacing full GeoJSON document. You can find when the enhancement has been introduced in the Change Log, linked from the FME Downloads page.

Awesome.
Hello
I’m relieved to know there was a reason why I couldn’t get the GeometryReplacer approach to work.
Best wishes!