On Mon, Jul 13, 2015 at 05:10:46PM +0200, Davide DB wrote: > >> (City) Scaro-Reggio-Scornavacca-Vardaro > >> No ocean > > > > I get Scaro-Reggio-Scornavacca-Vardaro, Tirreno Sea > > > > So possibly the call to the oceans API timed out for you or failed for > > another reason. > > Yes, > I repeated several time this place via Subsurface and geotags are > added while I get a reply form the service. > I have in my preferences: Country/Ocean/City > I got: > > Italy/Scaro-Reggio-Scornavacca-Vardaro > > Then 30" later > > Italy/Tyrrhenian Sea/Scaro-Reggio-Scornavacca-Vardaro
OK, so it was just a timeout issue. I wonder if we can automatically retry or something. At least once. > I was doing some test with few GPS fixes taken from my dives: every > time I think I found a solution or a good compromise, the next gps > data behaves differently :( > There are a lot of inconsistencies and a lot of plain errors (and al > of this only for my five gps fixes) > > ADM1 2 or 3 are absent in some countries. Yesterday I found a table on > their site but I'm not finding it again now. > > I found a list of Featured Code: > > http://www.geonames.org/export/codes.html (look at P city, village, ...) > > http://forum.geonames.org/gforum/posts/list/130.page > > Option one: > > Given that you use the findNearbyPlaceName WS with a radius of 50KM > maybe the best thing is to iterate through the results and trying to > get the lowest "PPLAx" among the nearest toponymName. > Doing so you always try to get the biggest nearest town. Well, the problem is that while in your environment you might want the biggest near town, in others you don't. I know quite a few dive sites that are named after the tiny little village just outside a big city and giving the big city would be wrong for them. Fundamentally I think the fix is to fix the data - the algorithm cannot possibly guess the right answer if the data are incomplete or misleading. > Option two: > > Playing with their maps I saw that they always give you a nice GeoTree > for each toponym... > So I found the hierarchy WS. It accepts a geonameId as input. Hence I tried > to: > call findNearbyPlaceName WS getting the geonameId of the nearest toponym. > Call hierarchy WS with that geonameId and iterating to the highest > PPLAx in the result. > > Unfortunately it fails with most of the tuscany GPS fixes... :( > > I.E. the gps position for my dive of three weeks ago is: > > http://api.geonames.org/findNearbyPlaceName?lat=42.340100&lng=11.089500&radius=50&username=demo > > Nobody know "Cala Piccola" but it could be Porto Santo Stefano, Porto > Ercole or even better Monte Argentario > > Calling the hierarchy WS. It is completely broken: > > http://api.geonames.org/hierarchy?geonameId=8980624&username=demo > > Form the hierarchy this populated place "Cala Piccola" (that actually > is a private residence) lies without municipality hence I guess that > only option one is viable. No, I don't think I want to go down that rabbit hole. Can you fix the data to have the right city in the adminName3 field instead? That seems like the much easier and much more reliable approach. /D _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
