kadyb / rgugik

Download datasets from Polish Head Office of Geodesy and Cartography
https://kadyb.github.io/rgugik/
Other
33 stars 3 forks source link

Ideas #2

Open kadyb opened 4 years ago

kadyb commented 4 years ago
Nowosad commented 4 years ago

TODO:

DONE:

TO DISCUSS/OMIT:

  1. the orto_download() function now expects the output of orto_request(). How about making it more user-friendly? One possibility, for example, would be for orto_download() to accept some spatial object (e.g., polygon, extent, point) and some other arguments (e.g., year, pixel). Then, the orto_request() would be used in the background. (We can keep the old behaviour when the first argument is a data.frame)
kadyb commented 4 years ago
  1. the orto_download() function now expects the output of orto_request(). How about making it more user-friendly? One possibility, for example, would be for orto_download() to accept some spatial object (e.g., polygon, extent, point) and some other arguments (e.g., year, pixel). Then, the orto_request() would be used in the background. (We can keep the old behaviour when the first argument is a data.frame)

I thought about it, and I suppose that oversimplification can cause mistakes and unexpected results. I see two main drawbacks here:

  1. What if the user enters unavailable attribute values (e.g. year = 2015, pixel = 0.05)? A variety of images are stored in the database, so there is a high probability that the user won't find images that meet his expectations in a given area and then will be disappointed that the function does not work. The safe solution is to return the available images, and then filter and download.
  2. What if as a result there are several dozen or several hundred high resolution images to download? I think, the user doesn't want to download all possible images compositions. Moreover, I think the user is interested in the images within one series, so he can merge them into a larger mosaic. In case of all possible image combinations, it will be impossible.
Nowosad commented 4 years ago

Good points. That's why my thinking was to keep the old behavior when the input data is a data.frame (a result of orto_request()) and only allow for one-step downloading with orto_request() in the background as a second option (for more advanced users). However, this is just an idea - you will make the decision.