randomly working reverse geocoding

Started by Gerhard, December 21, 2017, 06:51:18 PM

Previous topic - Next topic

Gerhard

Sometimes reverse geocoding works and sometimes not, even for a batch job not all are working.

Settings:
Google Maps Api key is set
Provider Search Google
Geocoding Service Google
Language de

at google:
Google Maps Geocoding API  enabled   
Google Maps JavaScript API   enabled

google never saw any request at this api even when it worked...

log is attached

Mario

You do reverse geo-coding in IMatch?
In the Map Panel?
Directly via the Menu?
Automatically during import or setting coordinates?

There is always the odd chance that there is a timeout, a firewall or a virus checker interferes or whatever.
Just try it again when this happens, it usually works then.

When IMatch runs into a timeout contacting a web service or a HTTP error code is returned it records that into the log file.
No such warnings in your log.

Try running the log file in debug mode (Help > Support) and keep a close eye on possible software/tools on your system which may cause this.
Such a problem was never reported before and I have never experienced this myself. A timeout or a general problem, yes. But then IMatch shows an error message or at least logs the error code.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Gerhard

It is amazing how fast you are with answering.
At the moment I call reverse geocoding via the menu. In the future I wanted to use automatic geocoding.

I already found an old post and changed the logging to debug.

Only error I found in the log is:
Google::ParseJSONElevation failed.

But I don't know what it means.

Jingo

Gerhard - I had a similar issue with reverse geocoding - couldn't get it to work... turned out my issue was although I had an api key - I hadn't activated it properly... do a quick search for my topic - might not be the same issue but it just might be! - Andy.

Mario

The ParseJSONElevation method in IMatch tried to figure out the elevation / Altitude from the Google.
Either Google does not return a proper elevation record or there is something with the format. IMatch cannot continue with the reverse geo-coding.

Is there anything special about the file?
Maybe write the precise coordinates into your reply.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Gerhard

Quote from: Jingo on December 21, 2017, 07:11:43 PM
Gerhard - I had a similar issue with reverse geocoding - couldn't get it to work... turned out my issue was although I had an api key - I hadn't activated it properly... do a quick search for my topic - might not be the same issue but it just might be! - Andy.
well I cannot find you post referenced here.

Gerhard

#6
Quote from: Mario on December 21, 2017, 07:22:41 PM

Is there anything special about the file?
Maybe write the precise coordinates into your reply.

No as my subject says, it's random.

My api key is
DELETED BY ADMIN
maybe it works on your end.

At least I hope to see an api call in the google api statistics

Mario

DO NOT SHARE your private Google keys. If somebody uses it to flood Google your account will be suspended or worse.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

As I said, I will need a sample file (or coordinates) which cause the Google API to return no or invalid elevation data.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Gerhard on December 21, 2017, 07:36:39 PM
Quote from: Jingo on December 21, 2017, 07:11:43 PM
Gerhard - I had a similar issue with reverse geocoding - couldn't get it to work... turned out my issue was although I had an api key - I hadn't activated it properly... do a quick search for my topic - might not be the same issue but it just might be! - Andy.
well I cannot find you post referenced here.

Here it is... it works for manual reverse geocode now which is good for me:
https://www.photools.com/community/index.php?topic=7255.msg51084#msg51084

Mario

I think the problem is that Google now requires a separate API key for reverse geo-coding and the elevation API (Altitude).

So far IMatch did not ask nor require an API key for these services because Google did not want one. I will enhance IMatch to use the Google Maps API key now also for the reverse geo-coding and the elevation lookup cloud APIs. Users will have to add these services to their key in the API console.

I have also added longer delays to the batch reverse geocoding feature to reduce the risk that a user is being banned because of too many requests per minute (e.g. while reverse geocoding 50 files at once).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Gerhard

Thank you very much.

Just used the new version 2017.13.2 and reverse geocoded 1196 images within 3 minutes with no issues.
Google Api shows the calls, so everything is working.

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook