Skip to main content
Question

Error converting GeoJSON to geometry using GeometryReplacer - INVALID_PARAMETER_GEOMETRY_SOURCE

  • December 2, 2020
  • 4 replies
  • 204 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 😣

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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
  • 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+33
  • Influencer
  • December 2, 2020
nielsgerrits wrote:

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+54
ebygomm wrote:

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.


Reply


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