Skip to main content
Question

Error converting GeoJSON to geometry using GeometryReplacer - INVALID_PARAMETER_GEOMETRY_SOURCE

  • December 2, 2020
  • 4 replies
  • 249 views

Im having trouble with something that seems extremely trivial. I'm trying to convert the GeoJSON output from an Arcgis REST API call into geometry using the GeometryReplacer.

FMENothing too fancy is going on, but for some reason I get  INVALID_PARAMETER_GEOMETRY_SOURCE out of the rejected port. I feel like I've done this countless number of times without issue.

 

If I save the API output to a GeoJSON file and read it using the GeoJSON reader, FME reads it fine.

 

I'm bewildered 😣

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • December 2, 2020

How it works for me: JSONExtractor after HTTPCaller with JSON Query

json["features"][*]["geometry"]

to attribute "geometry". Then GeometryReplacer GeoJSON attribute "geometry".

 

Tip: Finding the right JSON Query can be challenging, but FME really helps:

  • Save the json sample to a file.
  • In the JSONExtractor choose File/URL and select the sample file.
  • Click the ... button in JSON Query an select the element you are looking for.

SelectJSONQuery


  • Author
  • 1 reply
  • December 2, 2020

Ah yes! Thanks so much @nielsgerrits​ . I forgot that the GeometryReplacer is expecting GEOMETRY! Not the whole GeoJSON feature, which is why it's invalid. 😅


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • December 2, 2020

How it works for me: JSONExtractor after HTTPCaller with JSON Query

json["features"][*]["geometry"]

to attribute "geometry". Then GeometryReplacer GeoJSON attribute "geometry".

 

Tip: Finding the right JSON Query can be challenging, but FME really helps:

  • Save the json sample to a file.
  • In the JSONExtractor choose File/URL and select the sample file.
  • Click the ... button in JSON Query an select the element you are looking for.

SelectJSONQuery

I'm hoping that the next evolution of featurecaching allows you to build queries in this way within the JSON transformers from the cached JSON (Maybe it does already? I've not tried in 2020)


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • December 2, 2020

I'm hoping that the next evolution of featurecaching allows you to build queries in this way within the JSON transformers from the cached JSON (Maybe it does already? I've not tried in 2020)

yeah, this would be a nice optimization. Is not working this way in 2020.2.0.0.