Reverse geocoding frustration

Started by frorb, July 10, 2017, 02:19:38 PM

Previous topic - Next topic

frorb

Trying to reverse geocode all my images with valid GPS coordinates, and finding it very frustrating. If I select say 100 images and do a 'lookup all' it will sometimes (very rarely) finish so quickly that I have to check whether anything actually happened. Sometimes it will take up to 30 seconds or even more. But (by far) most often I get an error message:

IMatch could not establish a connection with the geocoding service at maps.google.com. The server may be unavailable or too busy. Please try again later.

Can't you make this code more resilient so that it re-tries if the connection is lost or not established?

Also I noticed that each time I re-try, the query starts again from the first image in the selection (which has already been reverse geocoded). Perhaps it would help if the re-query started at the first image that DIDN'T get reverse geocoded? (although if re-tries were built into the code this wouldn't require user intervention, it would just speed things up).

Mario

Please provide the log file. Maybe Google has just blocked your IP because of too many requests? The IMatch log file in Debug mode (Help > Support > Debug Logging) might contain more information, e.g. the precise error message returned by Google.

When you run the reverse geocoding command on selected files, it will run on all selected files. If you don't want to run it on files which already have proper data, don't select them. IMatch has no ways to know if you want to reverse geoc-code files again to fill in empty fields, to replace all data, because you have changed mapping settings and now you'll will get other data etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

frorb

So I have 36 images selected - all with no geocode info (using a filter to do this). Then I do Tools->Reverse geocode all selected files... ->Lookup All. The first time I get back geocode info for the first 6 images. Lookup all again: still only the first 6 have geocode info. Lookup all again: now the first 12 have geocode info. And so on until the entire selection has geocode info - or I give up and cancel the reverse geocode window.

Or scenario 2: I have 200 images selected - again using the filter so no geocode. Then I do Tools->Reverse geocode all selected files... ->Lookup All. The first 8 files get geocode info, then I click OK. Now the 8 geocoded files get filtered so no I have 192 files selected. So again Tools->Reverse geocode all selected files... ->Lookup All. Another 10 files get geocoded and my selection is now 182 files. etc. etc. etc.

Either way it's a pain to have to keep repeating the lookup process, so I wondered whether some more automation/retries could be built into this?

The error that keeps popping up in my logfile is: PTR_MSG_GEO_SERVERDOWN

Mario

I would need the full log file in debug mode (Help > Support > Debug Logging) to help you further. Server down means that either Google has blocked your IP or IMatch could not reach the server (firewall? Anti-virus interfering?) Google is usually a no problem option.

Did you try Geo-Setter (after getting your own key)?

I have just successfully used Google to reverse geo-code about 200 files in one go. No issues (I'm in Germany).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

Quote from: Mario on July 11, 2017, 11:54:25 AMDid you try Geo-Setter (after getting your own key)?

That begs for the next question: do you have an own username for geonames.org? If not, you may well be blocked because of too many "anonymous" requests.
I just tried it on 1200+ files and it took ~3 seconds to kook them all up, with my own username for geonames.org