encapsulated peps_download script in peps_download function#42
encapsulated peps_download script in peps_download function#42floriandeboissieu wants to merge 5 commits intoolivierhagolle:masterfrom
Conversation
|
Thanks Florian, |
|
HI @olivierhagolle, would you have some time to check and merge this PR as it would allow peps_download usage as a part of an automated processing python script (before calling snappy for example) |
|
Hi, actually I continued to enhance the package with multipage requests, usage of geometric file (shapefile, geojson, ...), return of file status, control of verbosity, etc. See https://github.com/floriandeboissieu/peps_download/tree/shapefile |
|
@matt6697 you can still install my fork with the following command for the moment: |
Ok I noticed the following new download option : I'm looking for such an option to avoid converting a geojson box into peps query parameters with the ability to select only Sentinel images containing the whole area of the query. It seems that peps is returning any image containing part of the query rectangle but the whole area is needed for some usages (change detection needs 2 images embedding the same area and it's a pain to check every image returned by peps) |
|
I am not aware of such a 'contains' option in peps query, however it could be done with geopandas and S2 kml grid |
|
Closing as the commits of this PR are incuded in PR #46. |
Dear Olivier,
Here is a proposition to encapsulate peps_download in a function so it can be also used in a python script.
For that I:
parse_command_lineseparated from the restpeps_downloadwith all options as inputs (thus removing theoption.prefixes)parse_catalog(search_json_file)becomesparse_catalog(search_json_file, orbit, collection, clouds, sat)trials(max_trials in function peps_download) andwaitto avoid infinite loop and control the time between trialsTell me if these modifications suites you.
Next step could be to add a setup.py file so that it can be installed with pip and imported or executed simply.