Closed Lineflyer closed 5 months ago
Support ticket 729689
No heavy uses (an absolute maximum of 1 request per second). […] Note that the usage limits above apply per website/application: the sum of traffic by all your users should not exceed the limits.
Apps must make sure that they can switch the service at our request at any time (in particular, switching should be possible without requiring a software update). If at all possible, set up a proxy and also enable caching of requests.
Yes, both limitations have to be taken into account.
No heavy uses (an absolute maximum of 1 request per second). […] Note that the usage limits above apply per website/application: the sum of traffic by all your users should not exceed the limits.
Default option is (and should stay at) internal Android geocoding (using Play services), so MapQuest (and Nominatim, if implemented) are only used as fallback, thus for a much smaller user group.
Apps must make sure that they can switch the service at our request at any time (in particular, switching should be possible without requiring a software update). If at all possible, set up a proxy and also enable caching of requests.
I guess we will receive some http 429 or similar if the limit is hit, which c:geo could react on by temporarily disabling geocoding fallback.
If it is about a call from them "stop using our geocoder NOW", then we will have to implement some online flag (or implement the mentioned proxy - not sure how much work that would be).
As mapquest is now completely unavailable I guess we should implement Nominatim as fallback for non-Google devices...shall we?
I'm playing around a bit with the Nominatim API currently - seems to be easy enough to use for our use-cases. I can dig a bit deeper into it.
To comply with their usage policy we should set up a caching proxy.
@Lineflyer: Are we able to run a small PHP script and a MySQL/MariaDB database somewhere? This server should be reachable 24/7 (more or less).
@Lineflyer: Are we able to run a small PHP script and a MySQL/MariaDB database somewhere? This server should be reachable 24/7 (more or less).
I can offer my hosted webspace for that. Its PHP and SQL capable. Would only need to check if I have free SQL-DB instances in my package, but I guess so. You are thinking of a request cache / proxy?
Just tell me, what I shall do and I can make it available on short notice.
You are thinking of a request cache / proxy?
Yeah, c:geo would query our server - our server would look up in its own db and report back, if found, or otherwise query the remote server, store the result locally and report back to c:geo. Some automatic maintenance could be added, eg. "delete all results that are older than one month" or so, to keep the database in shape.
AFAICS we have two places where we need geocoding:
Do you know of any other places?
Do you know of any other places?
No, thats all AFAIK.
Some automatic maintenance could be added, eg. "delete all results that are older than one month" or so, to keep the database in shape.
Lets see how many entries we get. As those entries usually valid almost forever, we could create a growing databse ourselves with this.
That makes me think: Isn't there some database + code publicly available to completely host it ourselves?
That makes me think: Isn't there some database + code publicly available to completely host it ourselves?
Yes, it is. For self-hosting of a world file they recommend 128 GB of RAM :-)
Why do you think a caching proxy would help reducing the calls in any way? How likely is it that people ever search for exactly the same location a significant number of times?
Another question (sorry if it was already discussed): Would we use it for address search and/or also for geopoint to city name convertion?
moving-bits @.***> schrieb am Sa., 16. März 2024, 19:19:
I'm playing around a bit with the Nominatim API currently - seems to be easy enough to use for our use-cases. I can dig a bit deeper into it.
To comply with their usage policy we should set up a caching proxy.
@Lineflyer https://github.com/Lineflyer: Are we able to run a small PHP script and a MySQL/MariaDB database somewhere? This server should be reachable 24/7 (more or less).
— Reply to this email directly, view it on GitHub https://github.com/cgeo/cgeo/issues/15265#issuecomment-2002075781, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMW4ZXPUU4JJCNGQVWCNVTYYSEJNAVCNFSM6AAAAABCT2K4L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGA3TKNZYGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Why do you think a caching proxy would help reducing the calls in any way? How likely is it that people ever search for exactly the same location a significant number of times?
That depends on how specific the search is: Searching for "Tante Emmas Brötchenladen, Sylt" will probably being searched for only rarely, whereas searches for cities will be quite frequently (eg. "Berlin", "London", ...)
Besides that, implementing a proxy is a prerequisite for using the OSM nominatim server, defined by their usage policy.
Another question (sorry if it was already discussed): Would we use it for address search and/or also for geopoint to city name convertion?
Yes, both cases will be covered.
I'm in contact with @Lineflyer wrt to the server-side details, PR for the c:geo-side client will follow after the proxy is live.
FYI: Just found out that reverse geocoding ("coords to address" on home screen) always uses the builtin AndroidGeocoder
as of today, with no fallback to MapQuest. Will be fixed with the switch from MapQuestGeocoder
to OsmNominatumGeocoder
.
@moving-bits I chatted with @mucek4 and he will create a CNAME for api.cgeo.org to the URL we discussed. So you shall use that as the endpoint in c:geo code and we could direct it to whatever server we have in background in future.
Describe your problem!
Edit: ticket 831920
A user reported, that on his devices without GooglePlayServices he is not able to perform a adress search (reverse geocoding required). The problem appeared recently and worked before on same devices.
AFAIK we use MapQuest as a fallback if no Google Services are available. Looking at the users debug log I do see a 401 (Unauthorized) response from MapQuest.
How to reproduce?
Actual result after these steps?
Expected result after these steps?
Valid response
Reproducible
Unclear
c:geo Version
2024.01.06
System information
No response
Additional Information
Maybe the API conditions changed for MapQuest or we hit a limit (but I would assume another error code in such case)