Skip to main content

Hi,

I'm attempting to use the PlusCodeGeocoder Transformer,

The intention is to read a CSV of Google Plus (Open Location) Codes and then write an Esri shapefile. For example, map this as points:

id,google_plus_code
3,"53PP+34 Taromeo QLD, Australia"
106,"Q9XG+PF Widgee QLD, Australia"
511,"HGM4+5X Amamoor Creek QLD, Australia"

 

I've configured the visible parameters in the transformer. 

 

2023-02-14 10_49_39-Visual Preview 

The email value is the email I have registered with the Google Maps Platform for my API key.

When run, the status code is 200, meaning the request was received, but the output is routed to rejected with the _pc_response_body stating:

{
  "status": "NO_API_KEY"
}

Where in the Transformer can I provide the API key?

Cheers

Mic

 

 

 

@roland.martin​ created this custom transformer, maybe he can help?


@miczat​ Perhaps try testing your Google API Key in Geocoder to ensure the account is working as expected


@Mark Stoakes​ I checked and the API key works, by calling the API though Python using the requests library. The issue here is that I can't see a way to provide the API key with this transformer as a parameter it only asks for an email.

 

@roland.martin​  thanks for pointing out that us a custom transformer, I missed that. I've since learnt that Google Plus / Open Location codes come in two types, full (global) and short (local). Google will resolve full code without an API key, so for full codes, this transformer is working as designed. I have been supplied short codes, and they require an API key so that google can lookup the location of the locality so that it can resolve the local code.

 

Thank you both, I'll stick with a python approach when the API key is needed.


@roland.martin​ created this custom transformer, maybe he can help?

Thanks for tagging me, @Hans van der Maarel​!

@miczat​, I apologise - it's at least 4 years (possibly more?) since I created the transformer, and I don't honestly remember! From browsing the Plus Code API docs, it looks as though you should be able to add a "key" parameter to the URL, so it should be easy to add that to the underlying HttpCaller. I'm not on a machine with FME right now, but I'll see if I can fix it for you in the next day or two.


Thanks for tagging me, @Hans van der Maarel​!

@miczat​, I apologise - it's at least 4 years (possibly more?) since I created the transformer, and I don't honestly remember! From browsing the Plus Code API docs, it looks as though you should be able to add a "key" parameter to the URL, so it should be easy to add that to the underlying HttpCaller. I'm not on a machine with FME right now, but I'll see if I can fix it for you in the next day or two.

@roland.martin​ No apology necessary mate. I'm pretty sure people were grateful for the first one.


Reply