-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limits for geocodePL_get
#41
Comments
Also, I have not found such information anywhere. There are probably no such restrictions. However, in my experience, GUGiK's servers and services are problematic. BTW: At this moment the |
Ok, I understand. Maybe you could contact GUGIK's staff to ask about the limitations? BTW. is it possible that |
OK, I will write a message asking if there are limits on the number of requests and the time between them. Yes. This is a very good idea. There is definitely room for improvement. Currently we don't have time to do it, but I will definitely keep it in mind in the future. Edit: I sent email. |
Ok, so here is small proposal that combines the result of
Here's how it works
EDIT: if you like this proposal I may prepare PR with respect to EDIT2: I don't know how to use element |
I looked at your code (but I didn't test it). Maybe can we simplify it? output = geocodePL_get(address = "Marki")
df_output = do.call(rbind.data.frame, output)
# use "geometry_wkt"
df_output = sf::st_as_sf(df_output, wkt = "geometry_wkt", crs = 2180) Also, in geocodePL_get.R, we can remove if (length(output) == 1) {
output = output[[1]]
} so a nested list will always be returned, then we can drop The question: what if any column (attribute) is empty (NULL)? Will the function even work? |
If you simplify then results with only one query give incorrect output, see below:
Concerning the EDIT: I noticed that |
I think we should remove if (length(output) == 1) {
output = output[[1]]
} in source code and then use |
You check NULLs after output = jsonlite::fromJSON(prepared_URL)[["results"]] |
There is probably Lines 69 to 71 in 5e01945
|
Ok, I will go back with some improvements to the end of this week. |
Response from GUGiK:
So we don't know what the limit is, but I think we can assume that there should be a 1 second delay between requests. If the limit is exceeded, the function will stop working (there will be an error in |
Fixed in #43. |
Is there a limit for the number of / time between queries for geocoding using
geocodePL_get
? I tried to find this information on GUGIK webpage but I failed.The text was updated successfully, but these errors were encountered: